How to create the report using pass-in parameters

Hi all

I want to create a report using the parameters passed from the previous page. Let's take an example:

Now in page B, he got 2 parameters P1_Table, P1_column, from Page A, I want to get the report:

Select * from P1_Table, where P1_column like 'test % ';

This means that I want to get the date in the P1_Table table and its P1_column begins with the character 'test'.

I tried to use dynamic sql in the source of the region, but failed.

Please help me

Thanks in advance.


PPMonkey

Published by: PPMonkey on January 4, 2009 12:53 AM

Hello

Ensure that the report is a "SQL (body of function from PL/SQL returning the SQL) query. Then, use a source of something like:

DECLARE
 vSQL VARCHAR2(4000);
BEGIN
 vSQL := 'SELECT * FROM ' || v('P1_TABLE') || ' WHERE ' || v('P1_COLUMN') || ' LIKE '''test%''';
 RETURN vSQL;
END;

Andy

Tags: Database

Similar Questions

  • How to create the report using the procedure.

    Hi all

    I want to create the report in the apex. But I don't have a sql code. I have a single procedure. Is it possible to create the report using this procedure in the apex.

    CREATE OR REPLACE PROCEDURE headcsv_prc2

    AS

    CURSOR cr_header

    IS

    SELECT ood.organization_code, fm.formula_no AS "FORMULA_NAME."

    FM.formula_vers AS "FORMULA_VERSION."

    FM.formula_desc1 AS "FORMULA_DESC."

    DECODE (fm.formula_status,

    100, 'new ',.

    400, "approved for use in the laboratory."

    700, "allow the general."

    800, "We Hold."

    900, "frozen."

    1000, "obsolete/archived.

    ) AS "FORMULA_STATUS."

    DECODE (fd.line_type, '1', msib.segment1).

    DECODE (fd.line_type, '-1', msib.segment1 ') ingrediant.

    DECODE (fd.line_type, '2', msib.segment1) AS "BY_PRODUCT."

    DECODE (by_product_type,

    "W', 'waste."

    "R',"rework. "

    "Y', 'Yield."

    The of ', 'Sample. "

    NULL VALUE

    ) AS "BY_PRODUCT_TYPE".

    Of org_organization_definitions ood,.

    fm_form_mst fm,

    fm_matl_dtl fd,

    mtl_system_items_b msib

    WHERE ood.organization_id = fm.owner_organization_id

    AND fm.owner_organization_id = msib.organization_id

    AND msib.organization_id = fd.organization_id

    AND fd.organization_id = ood.organization_id

    AND fm.formula_id = fd.formula_id

    AND msib.inventory_item_id = fd.inventory_item_id

    - and fm. FORMULA_NO like '% THE % '.

    AND fd.line_type IN ('1 ', ' 2', '-1' ")

    Ood.organization_code GROUP,

    FM.formula_no,

    FM.formula_vers,

    FM.formula_desc1,

    FM.formula_status,

    FD.line_type,

    MSIB. Segment1,

    by_product_type

    ORDER BY fm.formula_no, fm.formula_vers;

    BEGIN

    Dbms_output.put_line (INITCAP ('the ORGANIZATION CODE')

    || ','

    || INITCAP ('NAME FORMULA')

    || ','

    || INITCAP ('FORMULA VERSION')

    || ','

    || INITCAP ('FORMULA DESC')

    || ','

    || INITCAP ('FORMULA STATUS')

    || ','

    || INITCAP ('PRODUCT')

    || ','

    || INITCAP ('INGREDIANT")

    || ','

    || INITCAP ("PER PRODUCT")

    || ','

    || INITCAP ('PER TYPE OF PRODUCT")

    );

    FOR ch IN cr_header

    LOOP

    Dbms_output.put_line (ch.organization_code

    || ','

    || ch.formula_name

    || ','

    || ch.formula_version

    || ','

    || '"'

    || ch.formula_desc

    || '"'

    || ','

    || ch.formula_status

    || ','

    || ch. Product

    || ','

    || ch.ingrediant

    || ','

    || ch.by_product

    || ','

    || ch.by_product_type

    );

    END LOOP;

    EXCEPTION

    WHILE OTHERS

    THEN

    Dbms_output.put_line (' No error: ' |) SQLCODE. "Error Msg: ' '.

    || SQLERRM

    );

    END;

    EXEC HeadCSV_Prc2



    Thank you

    Rambeau

    Hi Christian,

    In addition to the fact that the Oracle database has an internal Java engine and it would be possible for Apex call a Java stored procedure, the Apex really has nothing to do with Java. To create a report, you discovered, you specify a SQL query. In certain circumstances, you can embed a query in a PL/SQL function, but the incorporation of an arbitrary Java application and waiting for it to be called from Apex for a kind of security is there with the fairies.

    I recommend you research the Apex and then enter your so-called "higher authorities" how things work.

    Concerning

    André

  • How to create the report of this style?

    Hello

    I have a problem when creat a report using obiee, this is a monthly report, the layout like calendar,.

    There is a quick baseed on the month, if I choose 201109, the report will be poster of daily sales and the number of customers in September.

    Every day have the sale and every day must be listed, first line display name of 7 days, second row shows sales and number of customer information,

    third row display name of 7 days, and all the following steps.

    1 sep | 2 sep | 3 sep | 4 sep | 5 sep | 6 sep | 7 sep
    Sales: sales: 10 sales: 10 sales: 10 sales: 10 sales: 10 sales 10,10
    : No.10 No.: No. 10: No. 10: No. 10: No. 10: 10 no: 10

    8 sep | 9 sep | 10 sep | 11 sep | 12 sep | 13 sep | 14 sep
    Sales: sales: 10 sales: 10 sales: 10 sales: 10 sales: 10 sales 10,10
    : No.10 No.: No. 10: No. 10: No. 10: No. 10: 10 no: 10

    15 sep | 16 sep | 17 sep | 18 sep | 19 sep | 20 sep | 21 sep
    Sales: sales: 10 sales: 10 sales: 10 sales: 10 sales: 10 sales 10,10
    : No.10 No.: No. 10: No. 10: No. 10: No. 10: 10 no: 10

    22 sep | 23 sep | 24 sep | 25 sep | 26 sep | 27 sep | 28 sep
    Sales: sales: 10 sales: 10 sales: 10 sales: 10 sales: 10 sales 10,10
    : No.10 No.: No. 10: No. 10: No. 10: No. 10: 10 no: 10

    29 sep | 30 sep
    Sales: sales 10: 10
    No: 10 no: 10

    Thank you! waiting for your response.

    So you're a user same as below:
    How to view the report by using the style of calendar in obiee

    Follow my instructions. Also, give a look at this http://bischool.wordpress.com/2010/10/22/calendar-view-in-obiee-and-applications/

    You can have dates instead of the name of the day, but you must ensure that your definition is very clear in your time dimension i.e. each week week 7 days. You table looks like his week to jump and you have each month as 30.31 or 28 days...

    Come and play and you're done... hope its helpful

  • How to create the report in the following form?

    Hi all

    How I use studio EN to create reports.
    I want to create a report that will show me accounts and accounts of each entity, which means I want to keep the entity in the size of the page in the dimension of the line. The report should be done in such a way that if I take an entity in the dimension of the page then it will show a few accounts in the dimension line that
    are specific for this entity and in the same way, if I take another entity in the dimension of the page then it should show me another different set of accounts in
    the dimension of the row corresponding to this specific entity.
    How can I do this in my report?


    Thank you

    There are two ways that you can achieve this goal.

    You have never given in combinations of entity/account disabled? If this isn't the case, I would like to delete missing lines.

    Is there the potential for existing data in invalid combinations of entity/account, then I would create a specific account that defines the valid combinations. Think of it as a Boolean, a value of 1 for the valid combinations or 0 for invalid combinations. I would then use the 'Advanced Options' en to delete values based on this account.

    Hope this helps,
    -Jake

  • Need advice on how to create the report

    I don't know how to do this, so I ask for advice from the gods apex...

    Here is the question, I have two tables I need to combine the info from. not a problem in his car. I can do it. but here's the question. in table A, I have some data such as title, theids, disc_id, etc... Table B contains fullname, theid, emplid

    now in the table A column "theids" is filled with apex as a multi select list. the values in the column is therefore something like 48; 3; 88

    He got these identification numbers of the Table B (popup lov) query that returns theid of the one of the person.

    now, I need to create a report that will be used in an excel download and what they want is a line by disc_id and they want the most useful "cost" in the field where to run the "theids." It is instead of:

    disc_id title theids
    101 the 48 test; 3; 88

    they want:

    disc_id title Theids
    101 N33456, N3457, try N43562

    so I'm a bit stuck, I can understand how to write a sql using instr to get something like this:
    101 N33456 of test
    101 N3457 of test
    etc.

    but this isn't what they want. so I think I need to create a package to do this and some sort of return values. the problem is that I can't figure out how I can replace the 48; 3; 88 to N33456, N3457, N43562

    I'm still new to this kind of things pl/sql and apex sorry if this appears to be an obvious answer.

    If you have a look at this example:

    http://HTMLDB.Oracle.com/pls/OTN/f?p=31517:138

    You'll see there

    SELECT empno, ename, job, mgr, sal
      FROM emp
     WHERE INSTR(':'||:p138_select_empno||':', ':'||empno||':') > 0
    

    and

    p138_select_empno is a multiple selection list displaying the names of the employees and containing the string of nosm as 7888; 8900; 3499.

    This info is enough to get to a function like this:

    CREATE OR REPLACE FUNCTION get_string (p_string IN VARCHAR2)
       RETURN VARCHAR2
    IS
       v_string   VARCHAR2 (4000);
    BEGIN
       FOR c IN (SELECT ename
                   FROM emp
                  WHERE INSTR (':' || p_string || ':',
                               ':' || empno || ':'
                              ) > 0)
       LOOP
          v_string := v_string || ', ' || c.ename;
       END LOOP;
    
       v_string := LTRIM (v_string, ', ');
       RETURN v_string;
    END;
    

    and use this function in a report like this:

    SELECT get_string (:p138_select_empno)
      FROM DUAL
    

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • How to create the custom using Javascripts in PLM for Agile process validator

    I have already created customized using ASP.Net validators. But now I need to create custom using Javascript validator.

    Please provide me the details

    1. how to create custom validator and where to create?

    2 provide me with code samples for custom validators javascripts

    Thank you

    Floquet

    I am currently using 6.1.1.5

  • How to create the Table using the column Drag and Drop feature

    Hello:
    I'm new to Data Modeler tool Oracle SQL dev and would like to know if there is a way to create a new table by reusing existing columns or groups of columns. The idea is to maintain consistency and save time of table design. If the columns created previously can be reused and require, drag and drop column in the right pane, then only new columns must be created manually.

    Any thoughts on this will be appreciated.

    Thank you!

    Yes - just change the name of the model table in the script (t_name = "table_template") then save this new transformation for later use.

    I don't know how to apply only some of the tables. Seems like something you could do to a secondary view level?

    Perhaps someone else on the forum can advise how to change the script to work on a subview only instead of the whole model.

  • How to create the database using the command line?

    Hi all

    Win7
    10g or 11g

    I want to create a new database using a script.

    I set up my new SID and oracle_home.

    Then sqlplus / DBA.

    then I execute a common script...
    startup nomount;
    create database PRODB
           logfile group 1 ('z:\oradata\PRODB\redo01.log',
                            'z:\oradata\PRODB\redo01b.log') size 50M,
                   group 2 ('z:\oradata\PRODB\redo02.log',
                            'z:\oradata\PRODB\redo02b.log') size 50M,
                   group 3 ('z:\oradata\PRODB\redo03.log',
                            'z:\oradata\PRODB\redo03b.log') size 50M,
                   group 4 ('z:\oradata\PRODB\redo04.log',
                            'z:\oradata\PRODB\redo04b.log') size 50M
           character set AL32UTF8
           datafile 'z:\oradata\PRODB\sysPRODB.dbf' size 500M
           sysaux datafile 'z:\oradata\PRODB\auxPRODB.dbf' size 300M
           undo tablespace undo
                   datafile 'z:\oradata\PRODB\undoPRODB.dbf' size 100M
           default temporary tablespace temp
                   tempfile 'z:\oradata\PRODB\tempPRODB.dbf' size 150M;
    @/opt/app/oracle/product/10.2.0/db_1/rdbms/admin/catalog.sql;
    @/opt/app/oracle/product/10.2.0/db_1/rdbms/admin/catproc.sql;
    connect system/manager;
    @/opt/app/oracle/product/10.2.0/db_1/sqlplus/admin/pupbld.sql;
    exit;
    
    
    
    SQL> startup nomount;
    ORA-12560: TNS:protocol adapter error
    SQL> create database PRODB
      2         logfile group 1 ('z:\oradata\PRODB\redo01.log',
      3                          'z:\oradata\PRODB\redo01b.log') size 50M,
      4                 group 2 ('z:\oradata\PRODB\redo02.log',
      5                          'z:\oradata\PRODB\redo02b.log') size 50M,
      6                 group 3 ('z:\oradata\PRODB\redo03.log',
      7                          'z:\oradata\PRODB\redo03b.log') size 50M,
      8                 group 4 ('z:\oradata\PRODB\redo04.log',
      9                          'z:\oradata\PRODB\redo04b.log') size 50M
     10         character set AL32UTF8
     11         datafile 'z:\oradata\PRODB\sysPRODB.dbf' size 500M
     12         sysaux datafile 'z:\oradata\PRODB\auxPRODB.dbf' size 300M
     13         undo tablespace undo
     14                 datafile 'z:\oradata\PRODB\undoPRODB.dbf' size 100M
     15         default temporary tablespace temp
     16                 tempfile 'z:\oradata\PRODB\tempPRODB.dbf' size 150M;
    I always hit it

    SQL > startup nomount;
    ORA-12560: TNS:protocol adapter error

    But if I run it on Linux is good.


    Help, please...


    Thank you very much

    zxy

    yxes2013 wrote:

    I want to create a new database using a script.

    Suggestion. DBCA allows to generate the database model and use the option "+ Save as scripts + ' (no need to create the database).

    In the scripts directory, there will be a couple of shell and SQL scripts to create the database. Use them as your CLI model for the creation of a custom database. (I guess that DBCA works the same on Windows as it does on Linux).

    Another option, if you are using Oracle XE, is to copy ORACLE_HOME/bin/createdb.sh (probably a + .cmd on Windows) script and change for use. If you manually add non-XE features to the script (such as the installation of the Java virtual machine) If you want a database of SE or EE. (whereby DBCA scripts are a better answer).

  • How to show the report use and history

    I need to view the information on the reports , my company has executed over the past 3 months.

    We will soon host updates
    and now is a good time to clean all the reports that we no longer use.

    I've used the System-> simultaneous administrator: program forms to map the report to concurrent programs files.
    But I do not know what reports we use actually.

    Thanks in advance for your support.

    Details of the message of pl of the EBS and OS versions.

    Reports, do you mean the simultaneous requests? Historic race is stored in FND_CONCURRENT_REQUESTS, assuming that the data has not been purged.

    If you use discoverer, use of report can be followed via statistics in the EUL

    HTH
    Srini

  • How to create the screenshot using satellites L50 - B

    I wonder how to take a screenshot on my Satellite L - 50 b. I followed the instructions on using Windows and notice that there is a button on
    my keyboard that says end and print screen. I tried pressing the button by itself, with shift caps lock, shift, control, alt, and numlock and then stick this in a document, but without any result.

    Usually, you need only the PRTSC key and press CTRL + V to past the screenshot in applications like Paint, Word, etc...

    But wow on the use of the capture tool to capture screenshots?
    http://Windows.Microsoft.com/en-us/w...#1TC=Windows-8

  • How to create the report with check box (Update, Delete) operations

    Hi all

    I want to create report with check boxes.

    I created it based on the user's manual. But do not delete records. Please help me

    Apex. Oracle.com

    workspace: APPSGURU

    RAMBEAU. [email protected]

    P.W:rag$ 123

    Application:36232

    Page: 14

    Thank you and best regards,

    Rambeau

    Raghu,

    Request for check line deleted successfully.

    made some changes in the removal process.

    Leave.

  • How to create the form using adf bc?

    Use case: I have a data name AppModulDataControl control it has used view object .i just want to create new employee. I have a jsf page when I drag and drop object views it does not show the Virgin filed. the field has some value .i just want the Virgin filed. I search in google and I found somethings called creation form .but not found in oracle jdeveloper 11 g.


    I just want to create an employee form where the user can include information and save in the database


    Thank you
    Prateek

    You must use the CreateInsert Action
    Check out these links:
    http://blogs.Oracle.com/Shay/2007/07/executing_an_action_on_jsf_pag.html
    http://download.Oracle.com/docs/CD/E17904_01/Web.1111/b31974/taskflows_activities.htm#BACFBDAE
    http://tanveeroracle.blogspot.com/2009/09/ADF-11g-CreateInsert-to-display-blank.html

  • How to create the stopwatch using adf?

    Hi experts,

    did you guys stopwatch example application using adf code?

    I'm trying to create by using javascript in the adf, but there is a problem updating the value.

    Thank you

    Hadi Wijaya

    Try, af:poll

    http://jdevadf.Oracle.com/ADF-richclient-demo/faces/components/poll.JSPX

  • How to create the report when your shared drive is full?

    I want to see the owner, size and date.for of the internal purposes.

    Hello

    • Work on the domain network?

    If the computer is not on the domain, you must use a third-party tool to use this feature.

    Note:

    Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

  • How to create objects dynamically (with # dynamics of parameters)

    I need to create a set of objects based on a definition of an XML file (obtained from the server) and add them to my scene.

    I understand how to create the object using getDefinitionByName (and limitations on classes that need to be referenced to be loaded into the SWF file).

    But some objects require parameters for the constructor, and others do not. The XML code can pass easily in required parameter information, but I can't figure out how to create a new object with a dynamic set of arguments (something similar to the use of the Function.Call method of (obj, argsArray).)


    For example, I need something like this works:

    var MC = new (getDefinitionByName (str) as class). call (thisNewThing, argsArray)

    Currently, it is that I can get:

    MC var = new (getDefinitionByName (str) as class)(static, list, arguments)

    Thoughts?

    I think what Dave is asking is a little different.

    He is eager to know how to call the constructor of an object dynamically (when he knows that the number of constructor arguments when running).

    This class I will do it, but seems to be a hack:

    s http://code.Google.com/p/jsinterface/source/browse/trunk/source/core/AW/utils/ClassUtils.a? spec = svn12 & r = 12

    See the "call" method, which has first counts the number of arguments and then calls one of the "n" construction methods based on the number of constructor args.

    I have yet to find a clean way of AS3 to do ala things 'call' however.

    -Corey

Maybe you are looking for