HOW TO Call REPORT from FORM usning a Button ?

Hi All,
Please Help me and Help other Beginers in this :
Hot to call a report from a form using WHEN_BUTTON_PRESSED trigger (using Oracle 10g R1)
Should i save the report as .rdf or .jsp ?
Should i save the report in a specific path ?
Should i add the path to the REPORTS_PATH in the registery ?
What about the Report Server ? should i install it first ?
What about the report properties ? what should i change ?
Please Help with Steps to make this sample report with the most important thing which is the PLSQL code we will type in the WHEN_BUTTON_PRESSED trigger.
Regards,
PS. i tried to search in the forum .. but u can imagine how hard it is to look within Messages: 164,066 - Threads: 46,773 - Pages: 3,119 :)

Hi there,
Most of the things do not come for free. You need to spend some effort in order to obtain results.
Check run_product, run_report_object built-in.
Also, download the documentation library and go through:
http://www.oracle.com/technology/documentation/devsuite.html
The example of how to use the run_product directly from the book "Oracle Forms Developer Form Builder Reference, Volume 1 - Release 6i.pdf":
RUN_PRODUCT examples
** Built-in: RUN_PRODUCT
** Example: Call a Report Builder report, passing the
** data in record group ’EMP_RECS’ to substitute
** for the report’s query named ’EMP_QUERY’.
** Presumes the Emp_Recs record group already
** exists and has the same column/data type
** structure as the report’s Emp_Query query.
PROCEDURE Run_Emp_Report IS
pl_id ParamList;
BEGIN
** Check to see if the ’tmpdata’ parameter list exists.
349
pl_id := Get_Parameter_List(’tmpdata’);
** If it does, then delete it before we create it again in
** case it contains parameters that are not useful for our
** purposes here.
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
** Create the ’tmpdata’ parameter list afresh.
pl_id := Create_Parameter_List(’tmpdata’);
** Add a data parameter to this parameter list that will
** establish the relationship between the named query
** ’EMP_QUERY’ in the report, and the record group named
** ’EMP_RECS’ in the form.
Add_Parameter(pl_id,’EMP_QUERY’,DATA_PARAMETER,’EMP_RECS’);
**Pass a Parameter into PARAMFORM so that a parameter dialog
will not appear
**for the parameters being passing in.
Add_Parameter(pl_id, ’PARAMFORM’, TEXT_PARAMETER, ’NO’);
** Run the report synchronously, passing the parameter list
Run_Product(REPORTS, ’empreport’, SYNCHRONOUS, RUNTIME,
FILESYSTEM, pl_id, NULL);
END;
Hope it helps,
Michael

Similar Messages

  • Calling Report From Form To Many Destinations

    Hi
    I am calling reports from forms using SET_REPORT_OBJECT_PROPERTY and then run_report_object.
    I dont know the destination until runtime of the report which is ok as I can pass this in via my procedure, but if that destination is many ie mail and file what is the best way to distribute the report?
    I could call my procedure for each destination but that seems a bit unefficient since the report would be created many times, is there another way?

    what about adding a drop-down-list near your report-button where you can choose the destination?
    when you click the report-button you simply read the value selected in the drop-down-list and send it to your reports-server too.

  • Calling Report from Form Error ORA-06508

    Dear all,
    I want migrate from Fom6i to Oracle Developer Suite 10g (10.1).
    Folder Form = C:\APLIORA\IRS\FORM
    Folder Report = C:\APLIORA\IRS\REPORT
    I have modified file DEFAULT.ENV
    FORMS_PATH=C:\APLIORA\IRS\FORM;C:\APLIORA\IRS\REPORT
    i do not have problem call a form from form.
    but when i call report from form show error ORA-06508 : PL/SQL : could not find program unit being called ; -6508
    my procedure is
    PROCEDURE Call_Report IS
         list_id ParamList;
    BEGIN
    list_id := Get_Parameter_List('input_params');
    IF NOT Id_Null(list_id) THEN
    Destroy_Parameter_List(list_id);
    END IF;
    list_id := Create_Parameter_List('input_params');
    Add_Parameter(list_id,'MAXIMIZE',TEXT_PARAMETER,'YES');
    Add_Parameter(list_id,'ORACLE_SHUTDOWN',TEXT_PARAMETER,'YES');
    RP2RRO.RP2RRO_RUN_PRODUCT(REPORTS,'TESTREPORT.REP',SYNCHRONOUS,RUNTIME,FILESYSTEM,list_id,null);
    END ;
    Do I miss something ?
    Can any one help ?
    Thanks

    Hi,
    Thank you for your replay.
    The problem have solved.
    This my step :
    1. Install Windows XP SP2 and Form 10.1.2.0.2 on new pc.
    2. Install Jinit version 1.3.1.28.
    3. Create report server
    3. Compile form, report and pll
    4. call report from from with this procedure :
    PROCEDURE Call_Report (vFILENAME varchar2) IS
    report_id                Report_Object;
    ReportServerJob VARCHAR2(100);
    vc_rep_status      VARCHAR2(100);
    repsvr                          varchar2(21) := 'myserv';
    userid                         VARCHAR2(100);
    pass                          VARCHAR2(100);
    Host                    VARCHAR2(100);
    BEGIN
    userid          := Get_Application_Property(USERNAME) ;
    pass          := Get_Application_Property(PASSWORD) ;
    Host          := Get_Application_Property(CONNECT_STRING) ;
    report_id:= find_report_object('REPORT');
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,vFILENAME||'.jsp');
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_SERVER,repsvr);
    ReportServerJob:=run_report_object(report_id);
    vc_rep_status := REPORT_OBJECT_STATUS(ReportServerJob);
    WHILE vc_rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED', null)
    LOOP
    vc_rep_status:=REPORT_OBJECT_STATUS(ReportServerJob);
    END LOOP;
    IF vc_rep_status='FINISHED' THEN
    WEB.SHOW_DOCUMENT('/reports/rwservlet?report='||vFILENAME||'.jsp'||'&userid='||userid||'/'||pass||'@'||Host||'&destype=CACHE&desformat=PDF&paramform=yes','_blank');
    ELSE
    message ('Report failed with error message '|| vc_rep_status);
    END IF;
    END;
    Ok, but i have another strange error. I will post new thread.
    Thank you and regards
    Teguh S

  • REP 110 & REP 0110 .calling reports from Form 10g(10.1.2.0.2)

    Hi All,
    We are migrating form from Oracle form 6i to Oracle 10g(10.1.2.0.2). I am calling reports from forms
    using Web.Show_Docment(). When we run reports in report builder 10g it works fine.
    But when we try to run reports from Forms 10g it throws error which is given below.
    We want to run reports from UNIX. After using this url to submit report we get error REP 110 and REP 0110
    URL
    http://GEM:7777/reports/rwservlet?server=rep_server&report=/u01/forms/QA_Forms10g/GEMREP.rdf+DESTYPE=CACHE+DESFORMAT=HTML+p_user_id=XYZ+p_client=2
    ERROR
    REP-110: File '/u01/forms/QA_Forms10g/GEMREP.rdf DESTYPE=CACHE DESFORMAT=HTML p_user_id=XYZ p_client=2' not found.
    REP-0110: Unable to open file '/u01/forms/QA_Forms10g/GEMREP.rdf DESTYPE=CACHE DESFORMAT=HTML p_user_id=XYZ p_client=2'.
    I will really appreciate your help.
    Thanks
    Sandy

    Hello,
    You are mixing 2 separators in the URL : & and +
    Use only one separator in the URL :
    Example :
    http://GEM:7777/reports/rwservlet?server=rep_server+report=/u01/forms/QA_Forms10g/GEMREP.rdf+DESTYPE=CACHE+DESFORMAT=HTML+p_user_id=XYZ+p_client=2
    Regards

  • Urgent: how to run report from forms runtime

    hi
    can anybody tell me how to call reports in forms through menu
    i just forgot how to call...
    exact menu item code!!
    rgds,

    Dear
    if u are using client server then use this code
    Run_Product(REPORTS, 'd:\emp.rep', ASYNCHRONOUS, RUNTIME,
    FILESYSTEM, 'x', NULL);
    if u r wsing web then use this code
    Web.Show_Document('/reports/rwservlet?server=myrepserv&report=test.rdf&userid=scott/tiger@mydb&desformat=pdf&destype=c
    ache&paramform=yes', '_blank');
    M Rizwan

  • FRM-41219 - Cannot able to call reports from form generated in Designer

    Hi
    I'm trying to call a report from form whit a button generated in Designer 10.1.2.0.2
    But I'm getting error : FRM-41219 Invalid report id
    I'm tying with a menu but I'm getting the same error.
    Please help me

    Note 1056653.6
    FRM-41219 Cannot Find Report: Invalid ID
    Problem Description:
    You are getting error: FRM-41219 Cannot Find Report: Invalid ID
    Problem Explanation:
    The code is using find_report_object and passing a report name to the function.
    The statements are as follows:
    DECLARE
    repid REPORT_OBJECT;
    BEGIN
    repid := FIND_REPORT_OBJECT('report1');
    END;
    Solution Explanation:
    The error message frm-41219 is a new error code which corresponds to the
    Oracle Developer forms/report integration.
    This message essentially means that the report cannot be found. Specifying the
    correct name of a report object found in the forms object navigator (not the
    actual name of the rdf file) usually resolves the problem.

  • Calling report from form. Need PDF output

    I am calling a report from a form using RUN_PRODUCT. I need to display the form in PDF format. When the user clicks the button in the form to run the report, acrobat reader should open up and the report displayed there. Please help.
    Thanks

    Thanks for the response. The first part worked. I am able to get the output in PDF format. In the 2nd part where I want to open acrobat and display the output, I am having some trouble with the code. When I compile, it says
    win_api_environment.read_registry must be declared. Is there some package I need to attach?
    Also, in the After reports trigger, how do I pass vFile (I am assuming this is the PDF file name)?
    Thanks
    The first thing you'll want to do is pass parameters to the report IE DESTYPE, DESNAME and DESFORMAT where these could be FILE, 'c:\temp\report' and PDF.
    Then, you can try this piece of code I wrote (with some help from other people at Metalink and here) sometime back. Now, I call it from forms, but in your case, you'd have to run it in the after report trigger. Since with RUN_PRODUCT you don't know when the report is finished, if you did it from the form, it wouldn't work correctly.
    PROCEDURE OPEN_PDF(vFile IN VARCHAR2)
    IS
    vcServerApp varchar2(40);
    vcServerTag varchar2(600);
    vcCommand varchar2(2000);
    iArgPos pls_integer;
    dummy NUMBER;
    BEGIN
    -- 1 get the Server App for .PDF files
    vcServerApp := win_api_environment.read_registry('HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\.PDF','',true);
    -- 2 get the executable
    vcServerTag := 'HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\'||
    vcServerApp||'\SHELL\OPEN\COMMAND';
    vcCommand:= win_api_environment.read_registry(vcServerTag,'',true);
    -- 3 Sort out how to specify the Filename
    iArgPos:= instr(vcCommand,'%1');
    if iArgPos = 0 then --no substitution Var on the command line
    vcCommand := vcCommand||' '||vFile;
    else
    vcCommand := substr(vcCommand,1,(iArgPos-1))||
    vFile||substr(vcCommand,(iArgPos+2));
    end if;
    -- 4 Run using Winexec (or Host if preferred).
    win_api_shell.winexec(vcCommand);
    EXCEPTION
    when no_data_found then
    abortt('Acrobat Reader was not found! Please consult with your help desk to install it and try again.','N');
    END;
    Chad
    I am calling a report from a form using RUN_PRODUCT. I need to display the form in PDF format. When the user clicks the button in the form to run the report, acrobat reader should open up and the report displayed there. Please help.
    Thanks

  • Hi how can print report     from form directly

    Hi,
    I would like to print report from D2k directly....
    i.e. suppose we pressed a button report has to be generated and printed automatically.... Generating of report is done by Run_product function, but how to give print directly...
    please u send ur valuable suggestions to my mail id also
    [email protected]
    bye!

    When calling the report from form, include 2 more parameters in the parameter list:
    - PARAMFORM=No
    - DESTYPE=Printer
    hth

  • Getting rep-3002 when calling report from form on web

    i am getting rep-3002 when i call report from a form on web environment. Report is in character mode. It is coming proper if i change it to bitmap. but my requirement is of character mode. pl. give some solution.

    Hello,
    If you are running in WinNT/2000 environment, the NT/2000 user which runs the Report Server service must have a printer defined. In the control panel, look at the properties for the Report Server to see what user it runs as. Log in as that user and make sure a default printer is defined.
    Regards,
    The Oracle Reports Team --skw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Calling report from form in Web environment

    Hi,
    We are in the process of migrating our C/S appication (developed in Developer2k) to intranet using OAS. My question :
    a) Is there any other way to call report from a form other than web.show_document?
    b) When a report is called from the report server(using web.show_document), a log-in screen comes up unless the login and password is passed as parameter. Only problem with this is the password shows in the URL. Is there any other way to make the call so that the login & password does not show and the user won't have to login a second time to run the report?
    Any reply would be appreciated..Thanks

    1. Yes you can use run_product package procedure to call reports on web, Oracle documentation says that run_product command will run in web env.
    2. Yes you can hide username & password from user, it depends on which method you are using to call reports, if you are using web cgi then add username & password in file "cgicmd.dat" and "oascmd.dat" for web catridge or in cartridge parameter setting you will find this files in directory "\orant\report60\server\".
    Darshan Desai
    [email protected]
    null

  • Call report from form 10g (10.1.2.0.2)

    hi
    i using win 2003 and db 10g and dev10g ( 10.1.2.0.2)
    and i want to call report from my form as following code :
    DECLARE
    dir varchar2(200);
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(20);
    BEGIN
    dir:=co$win.get_current_directory ;
    repid := find_report_object('CGNV$OFG_REPORT');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,dir||'\rep.jsp');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,runtime);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'HTML');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rws');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=yes');
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' --or rep_status is null
    THEN
    WEB.SHOW_DOCUMENT('http://hamid:8889/reports/rwservlet/getjobid'||
    substr(v_rep, instr(v_rep,'_',-1)+1)||'?server=rws','_blank');
    ELSE
    message(ER_RP);
    END IF;
    END;
    but i get error :
    frm-41213: unable to connect to the report server rws
    plz help me

    hi
    i using win 2003 and db 10g and dev10g ( 10.1.2.0.2)
    and i want to call report from my form as following code :
    DECLARE
    dir varchar2(200);
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(20);
    BEGIN
    dir:=co$win.get_current_directory ;
    repid := find_report_object('CGNV$OFG_REPORT');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,dir||'\rep.jsp');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,runtime);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'HTML');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rws');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=yes');
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
    WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
    LOOP
    rep_status := report_object_status(v_rep);
    END LOOP;
    IF rep_status = 'FINISHED' --or rep_status is null
    THEN
    WEB.SHOW_DOCUMENT('http://hamid:8889/reports/rwservlet/getjobid'||
    substr(v_rep, instr(v_rep,'_',-1)+1)||'?server=rws','_blank');
    ELSE
    message(ER_RP);
    END IF;
    END;
    but i get error :
    frm-41213: unable to connect to the report server rws
    plz help me

  • How to run report from form using run_object_report

    I AM USNING FORMS9I/REPORTS 9I , HOW TO RUN REPORT FROM FROM USING RUN_REPORT_OBJECT AND HOW
    TO PASS PARAMETER AS WE DID IN RUN_REPORTS PLEASE HELP ME

    here an example !
    I hope this example you can use it
    PROCEDURE pr_reporte IS
    BEGIN
    DECLARE
         repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status Varchar2(20);
    d1 DATE;
    d2 DATE;
    BEGIN
         d1 := :GLOBAL.DIA_INI;
         d2 := :GLOBAL.DIA_FIN;
         repid := find_report_object('rep_lab02');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'p_fec_uno='||to_char((add_months(last_day(d1),-1) +1),'DD/MM/YYYY')||' '||
         'p_fec_dos='||to_char(d2,'DD/MM/YYYY'));
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
         v_rep := RUN_REPORT_OBJECT(repid);
         rep_status := report_object_status(v_rep);
         WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
              rep_status := report_object_status(v_rep);
         END LOOP;
         IF rep_status = 'FINISHED' then
              WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver','_blank');
         ELSE
              ventana('E','error reporte no encontrado','S');
         END IF;
    END;
    END;
    The 'rep_lab02' is the name of the report that you give in the node reports
    p_fec_uno and p_fec_dos they are the parameters in the report
    repserver is the name of server created with rwserver
    Greetings

  • How to run report from forms 6i

    i want to run report from forms 6i.
    can anyone help me in this regard.
    asif iqbal
    karachi.

    hi
    try something like this.
    parameter_list_id := CREATE_PARAMETER_LIST('temp_data');
            mywhere:='where 1=1';
            if :RESULT_VALUE is not null then
                  mywhere:=mywhere || ' and diagnosis like ''%'||:RESULT_VALUE||'%''';
            end if;
            if :HISTORY is not null then
                  mywhere:=mywhere || ' and histodesc like ''%'||:HISTORY||'%''';
            end if;
            if :RCOMMENTS is not null then
                  mywhere:=mywhere || ' and scomments like ''%'||:RCOMMENTS||'%''';
            end if;
            if :PATHOLOGIST is not null then
                  mywhere:=mywhere || ' and PATHOLOGISTS like ''%'||:PATHOLOGIST||'%''';
            end if;
                mywhere:=TRANSLATE(mywhere,' ','~');
                ADD_PARAMETER(parameter_list_id,'MYWHERE',TEXT_PARAMETER,mywhere);
          RUN_PRODUCT(REPORTS,'C:\SearchResult.RDF',SYNCHRONOUS,RUNTIME,FILESYSTEM,parameter_list_id,NULL);
          ADD_PARAMETER(parameter_list_id,'PARAMFORM',TEXT_PARAMETER,'NO');
          DESTROY_PARAMETER_LIST(parameter_list_id);and also u can try the following code please modify it with u r requirements.
    declare
    v_plist_id paramlist;
    pl_name varchar2(50) := 'rep_params';
    begin
    v_plist_id := get_parameter_list(pl_name);
    check_param_list (pl_name); --Check availability of paramlist and
    destroy is present
    --When the parameter list already exists it needs to be distroyed first
    if not id_null(v_plist_id) then
    destroy_parameter_list(v_plist_id);
    end if;
    v_plist_id := create_parameter_list(pl_name);
    add_parameter(v_plist_id, 'P_1', text_parameter, :block_name.item);
    -- input parameter
    add_parameter(v_plist_id, 'PARAMFORM', text_parameter, 'NO'); --
    suppress the display of the Reports p-form
    add_parameter(v_plist_id, 'DESTYPE', text_parameter,
    :control.dest_type); -- set file destination type
    add_parameter(v_plist_id, 'DESNAME', text_parameter,
    :control.dest_name); -- set file destination name
    add_parameter(v_plist_id, 'DESFORMAT', text_parameter,
    :control.dest_format); -- set file destination format
    -- call reports
    run_product(reports, 'reports_file', asynchronous, runtime,
    filesystem, v_plist_id, null);
    end;sarah

  • Parameter form display while calling reports from form

    Dear All,
    I am running reports from form using run_report_object. I do not want to see parameter form while running the report. How do I do that.
    Thanks in Advance
    Gaurav Shah

    Hi, try to set paramform=NO in your parameter list
    Daniel

  • Calling report from forms :- need to disable file menu in report previewer

    Hi all,
    I am using report 6i and forms 6i
    I am invoking report from forms
    if report_status='N' then I want to disable the file menu in report previewer
    Is it possible to disable and enable file menu in report previewer
    Please help
    Thanks
    :8}

    i got way

Maybe you are looking for

  • Dynamic type variables

    I have a function module that receives a table name, in a character variable. How do I create a variable, within the function, of the type of the parameter-passed table ? I've been trying with field-symbols and create data, but without success. Could

  • Howto  developed an interactive form using Adobe LifeCycle Designer

    how to developed an interactive form using Adobe LifeCycle Designer

  • Got an error when install oracle 9i in linux 9 in windows virtual server

    Hi Guys, I am installing an oracle 9i in my laptop that is linux 9 server which is hosted in windows virtual server. when I ran runInstaller, I got an eror that is can't connect x11 windows server using........ When I ran xterm, I got can't open disp

  • Still big problem with "Adobe AIR 16" and "Adobe AIR 17"

    Device:Iphone 6 e Iphone 6 plus My application xml:     <fullScreen>true</fullScreen>     <aspectRatio>landscape</aspectRatio>     <renderMode>cpu</renderMode>     <autoOrients>false</autoOrients></initialWindow When I use "cameraRoll.browseForImage

  • Keyboard shortcut list for ColdFusion Builder

    I really liked the keyboard shortcuts in Builder 2.0, it helps me improve my productivity. But, there are times when I forget the keyboard shortcut and I will have to go to the preference page to learn the shortcut. Is there a document that can list