1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

How to Call a simple report from ORACLE 9i forms

Discussion in 'Oracle Forms and Reports' started by NAVEED, May 21, 2009.

  1. NAVEED

    NAVEED Active Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    55
    Location:
    karachi
    Hello...........
    how can i call simple report from ORACLE 9i forms
    i hope that the expert will help me.
     
  2. tyro

    tyro Forum Genius

    Messages:
    368
    Likes Received:
    20
    Trophy Points:
    260
    Location:
    India
    Hi Naveed

    You need to use the RUN_REPORT_OBJECT in your WHEN-BUTTON-PRESSED trigger code to run the report from 9i forms.You cannot use RUN_PRODUCT since 9i to run the report.
     
    NAVEED likes this.
  3. salmankhalid

    salmankhalid Forum Advisor

    Messages:
    116
    Likes Received:
    6
    Trophy Points:
    260
    Location:
    Lahore, Pakistan
    all you need is to copy this code on the report button on the trigger when button pressed and change it accoeding to your requiremtn by adding your required parameters

    IF :SYSTEM.FORM_STATUS ='CHANGED'
    THEN
    MESSAGE('Please Save changes before executing the report');
    MESSAGE('Please Save changes before executing the report');
    raise form_trigger_failure;
    go_item:)inter_dept_tran_detail.item_Id);
    else

    DECLARE
    PL_ID PARAMLIST;
    BEGIN
    PL_ID := GET_PARAMETER_LIST('PARAM_LIST');
    IF NOT ID_NULL(PL_ID) THEN
    DESTROY_PARAMETER_LIST('PARAM_LIST');
    END IF;
    PL_ID := CREATE_PARAMETER_LIST('PARAM_LIST');
    ADD_PARAMETER(PL_ID, 'PARAMFORM', TEXT_PARAMETER, 'NO');
    ADD_PARAMETER(PL_ID, 'MAXIMIZE', TEXT_PARAMETER, 'YES');
    ADD_PARAMETER(PL_ID, 'BACKGROUND', TEXT_PARAMETER, 'NO');
    ADD_PARAMETER(PL_ID, 'DESTYPE', TEXT_PARAMETER, 'SCREEN');
    ADD_PARAMETER(PL_ID, 'P_USER_NAME', TEXT_PARAMETER, :GLOBAL.USERNAME);
    ADD_PARAMETER(PL_ID, 'TRANSACTION_ID', TEXT_PARAMETER, :INTER_DEPT_TRAN_MASTER.TRAN_ID);
    RUN_PRODUCT(REPORTS,:GLOBAL.MMSREPORTS||'inter_department_transfer', SYNCHRONOUS, RUNTIME, FILESYSTEM,PL_ID,0);
    END ;
    end if;
     
  4. pitss_guy

    pitss_guy Guest

    In the web version of Forms (9i, 10g R1 and 10g R2) there is a replacement for RUN_PRODUCT provided by Oracle. It called RP2RRO, and there are a few steps required when upgrading, converting, migrating (whatever you call it personally).

    First, you need to add the RP2RRO library to the Form. Easy enough.

    Second, you need to add a Report Object to the forms. This does not have to be anything spectacular or even useful. It is just required to work.

    Thirst, repalce RUN_PRODUCT with RP2RRO.rp2rro_run_product (Case is just to help, excuse my programming style)

    Oracle Migration Assistant will help you out with this type of change