Calling Report from Menu (Oracle Forms 10g)

We have the applications in Forms6i & Reports 6i (Client Server) and migrating to Forms 10g and Reports 10g. We have the menu, from that menu we are calling all the forms and Reports. For especially Reports earlier we user RUN_PRODUCT but now 10g it is not working. How can call the report using RUN_REPORT_OBJECT
Important things we have some dynamic parameters (input) to the each report. That means when i called the report from the menu i need to get first parameter form to take the parameters and then can be run the report.

Here is the code to call report from menu in 10g
DECLARE
pl_id ParamList;
repid REPORT_OBJECT;
v_rep varchar2(100);
v_server VARCHAR2(100);
rep_status varchar2(100);
v_host VARCHAR2(100);
BEGIN
     select rep_server into v_server from reports_data;
     select machine into v_host from reports_data;
pl_id := Get_Parameter_List('tmpdata');
     IF NOT Id_Null(pl_id) THEN
     Destroy_Parameter_List( pl_id );
     END IF;
     pl_id := Create_Parameter_List('tmpdata');           
Add_Parameter(pl_id,'P_C_CODE',TEXT_PARAMETER,:GLOBAL.COMPANY);
Add_Parameter(pl_id,'P_B_CODE',TEXT_PARAMETER,:GLOBAL.BRANCH);
     repid := find_report_object('REPORTOBJ');
     SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,getpath||'E_VOUCHER_ENTRY.RDF');
          SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
          SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'htmlcss');
          SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,v_server);
          v_rep := RUN_REPORT_OBJECT(repid, pl_id);
          rep_status := REPORT_OBJECT_STATUS(v_rep);
          WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
               LOOP
                    rep_status := report_object_status(v_rep);
                         message('Running');
               END LOOP;
          IF rep_status = 'FINISHED' or rep_status is NULL THEN
               --Display report in the browser
               WEB.SHOW_DOCUMENT('http://'||v_host||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||v_server,'_blank');
          ELSE
               null;
     END IF;
END;

Similar Messages

  • HOW TO HIDE USERID PARAMETER, WHEN CALL REPORT FROM MENU USING FORM 10G

    good morning colegas
    i'm from panama
    when i call a report from a oracle forms menu, its send a user, pass and bd in the url, i need to hide this parameter userid,
    cuando llamo un reporte desde forms, se envia el usuario, pass y bd en el url nesesito ocultar estos parametros del url, le agradeceria si alguno tiene algun eejmplo q me de, de como ocultar estos parametros
    i'm using oracle forms y report 10g
    this is my msn [email protected]
    slds desde panama

    this document show us, only when i call a report from a forms, but not from a menu!
    but to hide these parameters, i need to create a bean in a block a way and the menus do not allow me to create these objects
    you done this before?
    you have a example?
    slds desde panama

  • Calling Report from Menu (Oracle Forms 11g)

    I'm trying to call a report from a menu item in a menu (that is attached to a form) in Oracle Forms 11g directly and I'm having some difficulty. I know how to call a report from a form and everything works perfectly.
    But since in a menu there is no item called "Report" to attach like there is in Forms, I followed on route which is to attach the "rp2rro" PL/SQL library on the menu file (mmb) and I also even did it on the form itself. Then when you convert a menu using the Forms Migration Assistant, it will comment out statements like "ADD_PARAMETER" and replace with calls to packaged procedures/functions from the package "rp2rro". I set all the parameters
    RP2RRO.SETOTHERS('PARAMFORM=YES');
    RP2RRO.SETDESTYPE('CACHE');
    RP2RRO.SETDESFORMAT('PDF');
    RP2RRO.SETCOMMUNICATIONMODE(SYNCHRONOUS);
    then made the call to the report:
    RP2RRO.RUN_PRODUCT(REPORTS, 'MYREPORT', SYNCHRONOUS, RUNTIME, FILESYSTEM, param_list_id, NULL);
    but all i get is the error "FRM-41219: Cannot find report: invalid ID."
    The Oracle documentation for integration reports in forms is for when you execute the report within a form not a menu item (that is attached to a form). Any clues?
    My environment is:
    Oracle (Database, Fusion Middleware) 11g - Red Hat Enterprise Linux 5
    Web Browser - Internet Explorer 7 on Windows XP Professional
    Thanks,

    Francois Degrelle wrote:
    Hello,
    One option is to use the Web.Show_Document() built-in, with the complete Report Server URL inside. Of course, you can hide some information (connection string for instance) by calling a section of the /reports/conf/cgicmd.dat configuration file.
    FrancoisI tried it using the code below
    DECLARE
    c_relative_path CONSTANT VARCHAR2(50) := '/reports/rwservlet/?server=';
    c_rep_srv_name CONSTANT VARCHAR2(50) := 'rep_wls_reports_calgf3_asinst_1';
    c_rep_name CONSTANT VARCHAR2(30) := 'copy_detail.rdf';
    c_desformat CONSTANT VARCHAR2(10) := 'htmlcss';
    c_destype CONSTANT VARCHAR2(10) := 'cache';
    v_username VARCHAR2(100);
    v_password VARCHAR2(100);
    v_db_instance VARCHAR2(40);
    v_connect_string VARCHAR2(300);
    v_rep_srv_params VARCHAR2(200);
    v_rep_url VARCHAR2(400);
    BEGIN
    v_username := LOWER(get_application_property(username));
    v_password := LOWER(get_application_property(password));
    v_db_instance := LOWER(get_application_property(connect_string));
    v_connect_string := v_username || '/' || v_password || '@' || v_db_instance;
    v_rep_srv_params := '&report=' || c_rep_name ||
    '&desformat=' || c_desformat ||
    '&destype=' || c_destype ||
    '&userid=' || v_connect_string ||
    '&paramform=yes';
    v_rep_url := c_relative_path || c_rep_srv_name || v_rep_srv_params;
    web.show_document(v_rep_url, '_blank');
    END;
    and I get a new tab in the browser opening up (which is good at least) with the Oracle Reports Services page saying:
    Error
    No such Web command ().
    Now I've tried putting a URL of a Oracle's website (http://www.oracle.com) and that works perfectly. Another question is, where would the default directory be if I wanted to say call an HTML file? Would it be in the directory of FORMS_PATH where all my fmb, fmx, rdf, pll, etc...files are stored?
    Thanks,

  • URGENT: Report parameter form set to yes in calling report from menu

    I have write this code for calling report from menu module. But where i put the code
    PARAMFORM='YES' to display the report parameter form in order to enter the parameter by user.
    DECLARE
    pl_id ParamList;
    repid REPORT_OBJECT;
    v_rep varchar2(100);
    v_server VARCHAR2(100);
    rep_status varchar2(100);
    v_host VARCHAR2(100);
    BEGIN
         select rep_server into v_server from reports_data;
         select machine into v_host from reports_data;
         pl_id := Get_Parameter_List('tmpdata');
         IF NOT Id_Null(pl_id) THEN
         Destroy_Parameter_List( pl_id );
         END IF;
         pl_id := Create_Parameter_List('tmpdata');           
    Add_Parameter(pl_id,'P_C_NAME',TEXT_PARAMETER,:GLOBAL.COMPANY);
    Add_Parameter(pl_id,'P_B_NAME',TEXT_PARAMETER,:GLOBAL.BRANCH);
    Add_Parameter(pl_id,'P_user',TEXT_PARAMETER,:GLOBAL.user);
         repid := find_report_object('REPORTOBJ');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,getpath||'E_open_balance.RDF');
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'htmlcss');
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,v_server);
              v_rep := RUN_REPORT_OBJECT(repid, pl_id);
              rep_status := REPORT_OBJECT_STATUS(v_rep);
              WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
                   LOOP
                        rep_status := report_object_status(v_rep);
                             message('Running');
                   END LOOP;
              IF rep_status = 'FINISHED' or rep_status is NULL THEN
              WEB.SHOW_DOCUMENT('http://'||v_host||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||v_server,'_blank');
              ELSE
                   null;
         END IF;
    END;

    Jeneesh,
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,
    'paramform=YES
    what about this variable ?
    P_VAR1 = ........');

  • Show the print dialog when running a report from an Oracle form.

    I would like to be able to print an Oracle report from an Oracle form but
    in addition show the print dialog. My PL/SQL code is shown at the bottom of this post.
    I have set the 'printjob' system parameter to 'YES' in the
    report and I can bring up a print dialog using the reports runtime.
    However, as soon as I run it from my form I lose this capability. Setting
    'printjob' to 'YES' in the code has no apparent effect.
    Many thanks,
    Ben
    -- Launch a report
    DECLARE
      v_pl_Id   paramlist; -- parameter list
    BEGIN
      -- add the parameters to the list.
      v_pl_id := CREATE_PARAMETER_LIST ('summary');
      ADD_PARAMETER (v_pl_id, 'destype', text_parameter, 'PRINTER');
      ADD_PARAMETER (v_pl_id, 'printjob', text_parameter, 'YES');
      -- run the report
      RUN_PRODUCT (
        reports
      , 'C:\Test Reports\Test.rep'
      , synchronous
      , runtime
      , filesystem
      , v_pl_id
      , NULL
    END;

    At 10g not 9i using a bean area on my canvas implementing the following class ...
    import java.awt.Frame;
    import java.awt.JobAttributes;
    import java.awt.PrintJob;
    import java.awt.Toolkit;
    import javax.swing.JPanel;
    import java.io.*;
    import oracle.forms.ui.VBean;
    public class Select_Printer extends VBean {
    public Select_Printer()
         super();
    public String getPrinterName()
    String PrinterName=null;
              JobAttributes jobAttributes;
              try{
                   jobAttributes = new JobAttributes();
                   jobAttributes.setDialog(JobAttributes.DialogType.NATIVE);
                   Frame dummyFrame = new Frame();
                   PrintJob pJobDialog = Toolkit.getDefaultToolkit().getPrintJob(
                   dummyFrame, "Printtest", jobAttributes, null);
                   PrinterName = jobAttributes.getPrinter();
              } catch (Exception e) {
                   System.out.println("Printer error!");
              return PrinterName;
    public static void main(String[] args)
    Select_Printer select_Printer = new Select_Printer();
    System.out.println(select_Printer.getPrinterName() );
    }

  • Hide report path in oracle form 10g (10.1.2.0.2)

    Dear all,
    I m oracle form 10g (10.1.2.0.2) ,when i run report through form using paramform='yes' then parameter form open with path and userid/pass please
    help me how to hide this path

    Dear all,
    I m using WEB.SHOW_DOCUMENT, but i m running report without AS
    using following code,
    v_pw:=
    get_application_property(password);
    v_user:=
    user;
    v_conn:=
    get_application_property(connect_string);
    lv_host:=
    :global.gv_ser_add;
    lv_sys_param:=
    '&server='||:global.gv_ser_nm||'&DESTYPE=CACHE&DESFORMAT=PDF&mode=DEFAULT&PARAMFORM=yes';
    lv_path:='report=D:\test.rep';
    lv_usr_dtls:='&USERID='||v_user||'/'||v_pw||'@'||v_conn;
    lv_url:=lv_host||lv_path||lv_sys_param||lv_gen_param||lv_usr_dtls;
    lv_url:=replace(lv_url,' ',lv_url);
    hidden_action := hidden_action ||'&USERID='||get_application_property(username)||'/'||v_pw;
    web.show_document(lv_url,'_blank');
    please suggest where i m doing wrong
    Thanks
    Manoj rajput
    hide report path in oracle form 10g (10.1.2.0.2) 

  • Can u call a BIP Report from within Oracle Forms?

    Hi,
    We want to use BIP as a reports solution for a Forms 10g Application. Currently we use oracle Reports. I would be very grateful if anybody can show us how to do the following as I could not find it in any documentation. Of course, I get the feeling that these cannot be done, but I want to double-check.
    (1.) How to call a BIP report with a input parameters from within an Oracle 10g Menu? i.e. when the user clicks on the menu item, BIP should be started and it should run the report within the BIP.
    -- So we also need a way to pass parameters to the BIP
    -- Also BIP has a different username/password also
    Is this possible or NOT POSSIBLE( i.e. U have to ask the user to login to BIP and then run the report)?
    Thanks & Regards,
    CS

    Hi,
    Have a look in this document to get an idea how to do:
    http://www.oracle.com/technology/products/xml-publisher/docs/Forms_BIP_v22.pdf
    Regards
    Rainer

  • Oracle reports 6i to Oracle forms 10g migration

    Hi,
    I have .rdf files which were created on Oracle Reports 6i. I would like to migrate the .rdf files into Oracle Reports module which is present as a part of Oracle Forms 10g to generate PDF output.
    Please let me know the detailed steps to be followed as I am a total newbie. Also I need to generate these reports on demand from a java 5 application (JSF 2.0).
    Currently for ORacle reports 6i, I have the following code in my java application
    rwrun60.exe g:\tomcat33\webapps\reports\web-inf\src\null userid=***/*** destype=FILE desformat="pdf" paramform=NO printjob=NO batch=YES desname=temp.pdf
    1. What would be the equivalent for reports in ORacle Forms 10g ? I know there is an Oracle Apps server where ther report services reside. How to I invoke my report from my java application (residing on a weblogic server 10.3.6)?
    2. What ould I do with the 6i .rdf files to upgrade them to 10g ?

    I am trying to call an Oracle report i.e .rdf (which is located on the Oracle  App Server) from my java EE 5 (JSF) application. The Oracle  App server is Oracle Application Server 10g Release 2. I assume Oracle report generation capability is available in this release.  I need to invoke the report from my Java JSF application on demand (whenever the user clicks a button on the web browser page, the report should appear on the browser as PDF) . My java application resides on Linux weblogic server.
    Please let me know how it can be done ? I see rwclient.sh and another method to directly invoke using a URL. How do I do it on java, would a request.redirect() to the URL work ?
    Also for hiding the params in the URL. keys need to be configured on the Oracle server right ?
    Also if we use rwclient.sh or the URL based invocation, would there be any issue in concurrency when multiple users request the same report at the same time ?

  • 9i - calling reports from menu

    Hi,
    Could somebody tell me if it's possible to call a report using the run_report_object facility from a menu. There isn't the reports node that there is on a form to define the report.
    Many thanks,
    Sean Dwyer

    can you run the report ok from a button on a test form?
    if so it should be just a matter of copying your code from the button into the menu item and copying the report object into the form that references the menu

  • How to open or call Excel from an Oracle Form in Apps11i

    I have a custom form in Apps 11i from which I need to be able to open an Excel spreadsheet. I'm aware that it is possible to a spreadsheet that is available on the local drive from a form, but can it be done from Applications ?

    If you do by yourself, you may call report in excel format, as of editing and saving back to database, you may need think other ways.
    webutil may be hhepful.

  • CALLING  EMAIL FROM AN ORACLE FORM

    HOW CAN YOU BRING UP EMAIL IN AN ORACLE FORM? I WANT THE USER TO SEE THEIR EMAIL MESSAGE. WHAT TYPE OF CODE DO I NEED TO USE TO DO THIS? CAN THIS CODE BE PUT IN A WHEN BUTTON PRESSED TRIGGER.

    Please post your question to the FOrms page - and click on the forums link
    otn.oracle.com/products/forms
    Regards
    Grant Ronald

  • Can't Call host command on Oracle Forms 10g on LINUX  ap server

    I have oracle developer suite 10g installed on Windows.I want to do some file operation in ap server(linux as 3)
    I can use the script in the terminal on linux. but i can't use it on form . this is the button press trigger!
    declare     
         a varchar2(200);
    begin
         a:='mkdir -p /data/apps/ygm';
    --     message(a);
    host(a);
    end;
    When the trigger execute, the linux hasn't do anything!
    What should I do?

    Check and make sure you've added the appropriate bin directories in the default.env file. I ran into the same problem with forms on OAS on HP-UX.
    Steve.

  • Calling Crystal Reports from Oracle Forms 10G

    Hi everyone,
    I am trying to call a crystal report from Oracle Forms 10G.
    I have a button on my Form which when clicked calls a Crystal Report which the uaser then wants to save as a PDf file.
    Can someone please send me the code to do this and also the exact steps that are to be followed.
    Thanks
    Fm.

    Hi Andreas,
    I am trying to call the crystal report from an Oracle Form using a URL. No batch file is being used here.
    I am looking for a peice of code similar to run_product or run_report built in in Oracle which calls an Oracle report from an Oracle Form.
    Also I dont want to display the report on a screen or a window in Oracle Forms. I would like it to run just as we run an Oracle Report from an Oracle Form.
    Is that possible ? If yes please let me know the steps to do this.
    Thanks
    Faiz
    Edited by: IQ on May 13, 2011 11:38 AM

  • Calling Word document from Oracle Forms 10g

    Hi all,
    I would like to call a Microsoft Word document from my Oracle Forms 10g.
    What would be the best way to do this?
    Thank you in advance.

    Have you tried something like
    WEB.SHOW_DOCUMENT('file:///<documentpath>','_blank');

  • Calling Reports from forms after migrating to 10g

    Hi all,
    I have migrated forms to 10g. Now, few of those forms have a button_block where some buttons have a WHEN_BUTTON_PRESSED trigger, and in that they are calling the reports. Now I need to change it.
    I have the following logic in it.
    declare
         musername varchar2(20);
         mpassword     varchar2(20);
         mconnect      varchar2(20);
         mparameter  varchar2(50);
         mcommand      varchar2(120);
         malert      number;
    begin
              musername := Get_Application_Property(USERNAME);
              mpassword := Get_Application_Property(PASSWORD);
              mconnect  := Get_Application_Property(CONNECT_STRING);
              mparameter:= 'mreceipt_no='||:global.receipt_no||' mreceipt_category_code='||:global.category_code;
              mcommand  := 'r25run.exe module=report_name.rep userid='||musername||'/'||mpassword||'@'||mconnect||' '||rtrim(ltrim(mparameter));
              host(mcommand,NO_SCREEN);
    exception
         when others then
              message('error');
    end;No I need to change, the line
    mcommand  := 'r25run.exe module=report_name.rep userid='||musername||'/'||mpassword||'@'||mconnect||' '||rtrim(ltrim(mparameter));
    How do I use run_report_object for this??

    Hi
    here is a complete example on how to call a report from a parameter form 10g
    DECLARE
       PARAM_ID                                 PARAMLIST ;
       PARAM_NAME                           VARCHAR2(30) := 'REPORT_PARAMETER';
       ALRT                                         NUMBER;
       ERR_TXT                                   VARCHAR2(1000);
       repid                                         REPORT_OBJECT;
       v_rep                                        VARCHAR2(100);
       v_REP_SERVER_NAME       VARCHAR2(200);
       v_ip                                          VARCHAR2(100);
    BEGIN
           PARAM_ID := GET_PARAMETER_LIST(PARAM_NAME);
           IF NOT ID_NULL(PARAM_ID) THEN
              DESTROY_PARAMETER_LIST('REPORT_PARAMETER');
           END IF;
           v_REP_SERVER_NAME := REP_SERVER_NAME;
    BEGIN
            SELECT  PARAMETER_VALUE  -- this is the selection of the server ip stored into a tabel u could assign it into a variabel.
            INTO   v_ip
            FROM GENERAL_FIXED_PARAMETERS
           WHERE PARAMETER_ID = 'REPORT_SERVER_IP';
           EXCEPTION
           WHEN OTHERS THEN   
           Message ('OTHERS' || SQLCODE || ' And ' || SQLERRM);
           Message ('OTHERS' || SQLCODE || ' And ' || SQLERRM);     
    END;
           PARAM_ID := CREATE_PARAMETER_LIST(PARAM_NAME);
           ADD_PARAMETER(PARAM_ID,'PARAMFORM',TEXT_PARAMETER,'NO');   
           ADD_PARAMETER(PARAM_ID,'COPIES',TEXT_PARAMETER,:COPIES);
           ADD_PARAMETER(PARAM_ID,'P_DISPLAY',TEXT_PARAMETER,:DESTYPE);
           ADD_PARAMETER(PARAM_ID,'DESFORMAT',TEXT_PARAMETER,'pdf');
           ADD_PARAMETER(PARAM_ID,'group_id',TEXT_PARAMETER, :group_id);
             repid := find_report_object('WH_R01_GRP_ITEM');
             SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,v_rep_server_name);     
             v_rep := RUN_REPORT_OBJECT(repid,PARAM_ID);
      WEB.SHOW_DOCUMENT('http://'||V_IP||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?server='||v_REP_SERVER_NAME,'_blank');
    END;
    Hope this helps...
    Regards,
    Abdetu...

Maybe you are looking for

  • TS1425 when connected to itunes its not showing my music library on computer

    When I connect my ipod to my computer it registers that it is my ipod but doesnt show the music library that is on the ipod.  This is not the original computer but I registered the ipod to the new computer,

  • How do you change print quality for eprinting?

    HP Photosmart 5515 OS installed XP The driver does not give this option. I like to do Fast Draft sometimes.

  • Resizing JButtons in a BorderLayout

    Hi, I've been working with a BorderLayout and whenever I try and set a JButton's size or preferredSize, it always ignores what I set it at and puts it's size as filling the entire BorderLayout.CENTER. Any ideas?

  • How to get the details inside base domain name?

    I need to extract the details inside the base DN like ou="" ,cn="" and so on.. Somebody please help me in getting the details inside the base domain name. I could able to get the attribute names and values for the domain name... Anyone please help me

  • Consolidation after copying Application

    hello everybody, i met with a consolidation problem. i copied an Application as test and changed the consolidation method of one entity from quote to at equity. after consolidation there is a big differece at the level of parent company in the test a