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é

Tags: Database

Similar Questions

  • 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

  • How to create a report based on the item selected from the list of selection?

    Hello

    I created a tables_LOV based on:

    Select table_name table_name user_tab_cols r, d

    where column_name like '% _type % '.

    Then I created a ListOfTables page element, display in a selection list and pointing to tables_LOV.

    I run the page, and I can choose the table I want in the drop-down list.

    How to create a report based on the selected element? (ex: select * from selected_table)

    Thanks in advance

    Salah

    Hi Salah,

    Allright, take a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report

    I think that simulates what you are trying to accomplish. I've implemented the simplest method I could think of.

    The report is based on a collection of apex. If you are not familiar with this, you should study the documentation: APEX_COLLECTION

    To recreate my example, you should:

    (1) create a report (interactive) on your collection

    SELECT *
       FROM APEX_collections
     WHERE collection_name = 'MY_COLLECTION'
    

    (2) create a selection list page_item for the tables that you want to display (in my case, this is called "P38_TABLES")

    (3) create a dynamic action that triggers on the evolution of your selection list page_item. Dynamic action must be a parade of PL/SQL procedure the following code:

    declare
      l_query varchar2(4000);
    begin
      l_query := 'select * from '||:P38_TABLES;
      if apex_collection.collection_exists
            ( p_collection_name => 'MY_COLLECTION' )
      then
        apex_collection.delete_collection
          ( p_collection_name => 'MY_COLLECTION' );
      end if;
    
      apex_collection.create_collection_from_query
        ( p_collection_name => 'MY_COLLECTION'
        , p_query           => l_query
        );
    end;
    

    Make sure that you add your page_item 'Page to send items' section.

    (4) add a real extra action that makes an update of the report area.

    Here are two photos describing the da:

    http://www.vincentdeelen.com/images/OTN/OTN_COLLECTION_REPORT_DA1.PNG

    http://www.vincentdeelen.com/images/OTN/OTN_COLLECTION_REPORT_DA2.PNG

    Good luck and greetings,

    Vincent

    http://vincentdeelen.blogspot.com

  • 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 IT strategy using the BES administrator API

    Hi all

    Can tell me, how to create IT strategy using the BES administrator API.

    Please provide me with the code example.

    Thanks in advance.

    Kind regards

    Sampath

    Hi Sebastian,.

    The Administration of BlackBerry API does not support the creation of it political. This feature is currently with the development of control and review for a future version of the BlackBerry Web Services for the Administration of the company.

    Kind regards

  • How to create the user account using the command?

    How to create the user account using the command?

    Open cmd as administrator, and then type the following commands one after the other

    NET user / add program mypassword
    net localgroup administrators program / add
    net share concfg * C:------/ grant: program, complete
    This will create a user account with the name "Program" and the password "MonMotpasse".

    You can create the user name and password of your choice.
  • How to create the script to compile procedure files in oracle - urgent deadline...

    How to create the script to compile procedure files in oracle.    about to go live and have much .prc pkg in a directory usr/tmp/ar... Po... human resources etc. need to create a script to compile all the files in the folder, then do not open all necessary .prc suggestions on how to do it.   Thank you Tom.

    (1) an urgent need, ASAP,... are words that do not in a forum of volunteer. We are here to help if you need it now, for free, open a SR.

    (2) oracle procedures are not files.

    (3) I think you are trying to run operating system packages, no Oracle procedure. right?

  • How to create the MUCOW file in xml using Adobe Muse

    How to create the file MUCOW as xml using Adobe Muse .kindly give step tutorial or PDF... WHERE DO I CREATE MUCOW? No idea for me

    Just lucky to have this info to my favorites

    MuCow Documentation

    Muse Jam Sessions_105_ConfiguringMucows

  • How to create the cursor in a stored procedure

    How to create the slider in the stored procedure. I want a simple example
    procedure - cursor - open-fetch - insert - last slider farm
    any idea or examples... Please help friends

    Thanks in advance

    Hello

    Search for explicit cursors in this link

    http://download.Oracle.com/docs/CD/B28359_01/AppDev.111/b28370/static.htm#insertedID2

    Kind regards
    Prazy

  • How to create screen saver using the java bean

    Hi all

    can someone knows how to create screen saver using java beans?

    Thanks in advance.
    Sarah

    It is a strange requirement, but you can go

    A TIME-NEW-FORM-INSTANCE:

    DECLARE timer_id Timer;
     one_minute NUMBER(5) := 60000;
    BEGIN
     timer_id := CREATE_TIMER('chnage_color', one_minute, REPEAT);
    END; 
    

    WHEN-TIMER-EXPIRED:

    DECLARE
         RandomR NUMBER(10):=dbms_random.value(1,256);
         RandomG NUMBER(10):=dbms_random.value(1,256);
         RandomB NUMBER(10):=dbms_random.value(1,256);
    BEGIN
    
     SET_CANVAS_PROPERTY('CANVAS2',BACKGROUND_COLOR, 'R'||RandomR||'G'||RandomG||'B'||RandomB);
    END; 
    
  • How to create the cluster in weblogic

    Hello to all the ups...

    We pass our 6i has 11 GR 1 material. After the migration of our very poor server performance. So now, we want to use clusters. After a google search, I have not found any better way to do. We create two independent with machine

    Server Admin

    Forms

    Reports

    Lets assume that the machine name is SACHIN1 and SACHIN2.

    Now, how to create the cluster on SACHIN1?

    Please help me.

    Thank you

    Sachin

    Hi salah

    I understand, he has several steps. The steps apply only to the WebLogic Server.

    To ensure high availability with a top layer products it is WDM. I did research more far and I found that there is a WDM for forms and reports.

    I found WDM for forms and reports 11.1.1.2:

    http://www.Oracle.com/technetwork/database/features/availability/MAA-EDG-frd-129690.PDF

    Is there a reason on why migration is 11 GR 1 matter? first support for 11 GR 1 matter ended in June 2014

    http://www.Oracle.com/us/support/library/LSP-middleware-chart-069287.PDF

    We could get help on the following forums:

    Oracle reports (MOSC)

    Oracle Forms (MOSC)

    Best regards

    Luz

  • How to call the procedure Oracle in ODI

    Hello

    I use ODI 10 g.

    Before you run the interface in a package, I wanted to place my procedure.

    I created the procedure in d/b (target)

    CREATE OR REPLACE PROCEDURE TEST_MY_NEW_PROCE
    AS
    BEGIN
    REMOVE FROM EMPLOYEE_TABLE
    WHERE EMPLOPYEE_ID LIKE '% P ';
    COMMIT;
    END;
    /

    The procedure works well in the target database.

    Now, before the execution of my interface, I want to run this procedure in my package. So can some please help me how to call this oracle (creation in target schema) ODI procedure and run it.

    Thank you.

    Hi, GRK,.

    You can create an ODI procedure, add one step, choose Oracle as technology and your target schema.
    Then just call it through a pl/sql block:

    BEGIN
     TEST_MY_NEW_PROCE;
    END;
    

    In your package, then drag this ODI procedure.

    Kind regards
    JeromeFr

  • Please show or ask how to create the value of arrayOfValues of setValuesAtTimes parameter?

    Hello AEScriptComm,

    I have a few small scripts that use the method setValueAtTime successfully placing a keyframe on the existing layers of maskPath, but as you can see in the scripts below, results of setValueSatTimeS errors using IE: "Array is not of the correct type", "value is not an array" or "Null is not an object", depending on ,...

    (A) what variable is used as the value of parameter IE:

    .maskPath;

    . maskPath.value;

    . maskPath.value.vertices

    (B) what kind of table is used as the parameter value as in:

    var addTheseKeys = new Array ((1,2,3,4);    (as a parameter of the time)...

    (with either)

    var keyValues = new Array([10,10],[100,100],[15,50],[100,120]);             ...." ]) "

    (GOLD)

    var keyValues = [[10.10], [100 100], [15.50], [100 120]];                               ... (Array of arrays? RE: " ]] " )

    I just read a 'push' of the values in a table may be necessary?, but I was hoping someone who knew setValuesAtTimes could show it please...

    1) .. How to create the value of arrayOfValues of setValuesAtTimes parameter?

    1 (a): WORK setValueAtTime script...

    App.Project.Item (1) .layer (1).property("Masks").property ("mask 1");

    var app.project.item = myProperty (1) .layer (1) .mask (1) .maskPath;

    myShape = app.project.item (1) .layer (1) .mask (1).maskPath.value;

    myProperty.setValueAtTime(1.0,myShape);

    1 (b): If there is no script setValuesAtTimes...

    prop1 = app.project.item var (1) .layer (1).property("ADBE_Transform_Group").property ("ADBE Position");

    var fourKeys = 4;

    var addTheseKeys = new Array (1,2,3,4),

    var keyValues = new Array (10, [10], [100 100], [15.50], [100 120]);

    var app.project.item = myProperty (1) .layer (1) .mask (1) .maskPath;

    myShape = app.project.item (1) .layer (1) .mask (1).maskPath.value;

    var myVertices = app.project.item (1) .layer (1) .mask (1).maskPath.vertices;

    myProperty.setValuesAtTimes (keyValues, addTheseKeys);

    app.beginUndoGroup ("Keys");

    ~ for (var k = 0; k < fourKeys; k ++)

    //~ {

    ~ prop1.setValueAtTime (keyValues [k], addTheseKeys [k]);

    //~ }

    myProperty.setValuesAtTimes (keyValues, addTheseKeys);

    app.endUndoGroup ();

    .. Thanks for any advise\suggestions,

    J

    (A). maskPath.value; It's always a Shape(). (maskPath is a property, not of a shape on its own, and maskPath.value.vertices is only a part of the shape data).

    (B) nothing of what you propose... that is why your failed script fails.

    var keyValues = new Array([10,10],[100,100],[15,50],[100,120]); and

    var keyValues = [[10.10], [100 100], [15.50], [100 120]]; are just as good as arrays of points, the only thing is that keyValues are arrays of objects Shape().

    Read the guide and script for how to report a form of this post (just wrote it...): http://forums.adobe.com/thread/1419866?tstart=0

    Your keyValues array should look like this: [keyValues0, keyValues1, keyValues2, keyValues3], where each entry is a Shape().

    Xavier.

  • Satellite P750 PSAY1A: how to create the recovery Toshiba on the new HARD drive partition

    Hello

    I have an old Toshiba Satellite P750 (PSAY1A-01Y022). I just upgraded my memory from 4 GB to 8 GB and am preparing to take my 500 GB HARD drive 1 TB. I had to order the disk online and wait to happen.

    I always try to understand how to create the arrival of my new HARD drive Toshiba Recovery Partition. I do the same thing for an old book, I handled based on something similar to it's original factory State.

    I have reflected on the recovery partition, but does not know how it was created. It is not NTFS. Does anyone have experience in the creation of a Toshiba Recovery on a new HARD drive Partition?

    And the help is very appreciated.

    Thanks and regards,
    Dinesh

    Recovery partition can be created when you use the original Toshiba Recovery disk and install recovery image. Before the partitions to boot OS install will be automatically created, recovery image copied on a recovery and then partition as last step recovery image installation starts.

    A sort of migration of files from one to the other HARD disk is not solution.

    Only for laptop with factory will work and the usable recovery partition.

  • How to create the .cod file to run on the Simulator BB9900

    Hi, I already from the zip package in order to use the bbwp command to create the .cod file and be able to run on the simulator of BB9900, but when I run this command as described in: https://developer.blackberry.com/html5/documentation/compile_ww_app_for_smartphones_1873321_11.html

    It creates two files, each with a .bar file, this type of file, I can't run it on the 9900 Simulator but a .cod file is required to run applications on the sim card.

    I don't know how to create the .cod file.

    Thank you

    Have you used Blackberry Webworks SDK for smartphone or Tablet SDK? The .cod files should be located in the subfolder OTAInstall of your output folder if you are using the Webworks SDK for Smartphone

Maybe you are looking for