How to Pass User-defined Parameters from Forms to Reports

Hi!I am trying to launch an existing report from a form then spool it into a PDF file. I have been successful in passing the report properties using SET_REPORT_OBJECT_PROPERTY built-in and I am also able to launch the report using RUN_REPORT_OBJECT built-in. My problem is, I cannot seem to pass the user defined parameters from my form to the report eventhough I am using the same variable names.
this is a part of my code:
repid := Find_Report_Object('ACPPRACS');
Set_Report_Object_Property(repid, REPORT_EXECUTION_MODE,BATCH);
Set_Report_Object_Property(repid, REPORT_DESTYPE,FILE);
Set_Report_Object_Property(repid, REPORT_DESNAME,'C:\TMP\ACS01.PDF');
Set_Report_Object_Property(repid, REPORT_DESFORMAT,'PDF');
Set_Report_Object_Property(repid, REPORT_OTHER,'PF_NBO_CD='| |'"'| |:acs.nbo| |'"');
v_rep := RUN_REPORT_OBJECT(repid);
Hope you can help me soon. Thanks!

first of all u will create a paramlist
then add_paramter to this list
and then pass this list to the report
by using run_product.
i think this is all.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jenny ([email protected]):
Hi!I am trying to launch an existing report from a form then spool it into a PDF file. I have been successful in passing the report properties using SET_REPORT_OBJECT_PROPERTY built-in and I am also able to launch the report using RUN_REPORT_OBJECT built-in. My problem is, I cannot seem to pass the user defined parameters from my form to the report eventhough I am using the same variable names.
this is a part of my code:
repid := Find_Report_Object('ACPPRACS');
Set_Report_Object_Property(repid, REPORT_EXECUTION_MODE,BATCH);
Set_Report_Object_Property(repid, REPORT_DESTYPE,FILE);
Set_Report_Object_Property(repid, REPORT_DESNAME,'C:\TMP\ACS01.PDF');
Set_Report_Object_Property(repid, REPORT_DESFORMAT,'PDF');
Set_Report_Object_Property(repid, REPORT_OTHER,'PF_NBO_CD='| |'"'| |:acs.nbo| |'"');
v_rep := RUN_REPORT_OBJECT(repid);
Hope you can help me soon. Thanks!<HR></BLOCKQUOTE>
null

Similar Messages

  • Passing user defined parameters in oracle reports thru command line

    Hi All
    We are currently using Reports 6i with Oracle 10g 10.2.0.4.0
    I would like to know that is it possible to pass user defined parameters values while calling report from command line.
    For Example: I am using following coding to call report from command line.
    for /f "tokens=1-3 delims=/ " %%a in ('date /t mm/dd/yyyy -1') do (
    set mm=%%b
    set dd=%%a
    set yyyy=%%c)
    rwrun60 report=c:\reports\banks.rdf userid=express/test@test_rs2 destype=FILE desname=c:\reports\banks%dd%%mm%%yyyy%.pdf desformat=PDF BACKGROUND=NO BATCH=YES
    The report contains some user defined parameter which is using in where condition of reqport query.
    Select * from banks
    where id = :Bank_ID
    Now I want to Pass value for :Bank_Id from command line (like we pass parameter list while calling report with run_product), how it is possible?
    Thanks
    Hassan

    Hi guys
    Fortunately I am able to perform the required task as I just added the report parameter field as follows:
    rwrun60 report=c:\reports\banks.rdf userid=express/test@test_rs2 destype=FILE desname=c:\reports\banks%dd%%mm%%yyyy%%h%%mi%%ss%%ts%.pdf desformat=PDF BACKGROUND=NO BATCH=YES ERRFILE=c:\reports\error.log LOGFILE=c:\reports\joblog.log bank_id='MCB'
    bank_id is the report parameter using in where clause.
    Regards,
    Hassan

  • How to pass parameters from Forms to Reports

    dear all,
    i'm running a report from a form using run_product(), now i want
    to pass a parameter from a form to report, say i want to display
    all the employees of deptno=10, so what parameter should i give
    in run_product() and what modifications should i make in the
    report???
    thanks and regards
    Tariq.

    Yeah,
    You can pass parameters to from form to report using
    Parameter list. E.g. You want to display all employees of Dept
    10.
    1. Create report with one user paramter say p_dept
    2. Now Using Parameter list and Run Product you can call report,
    see following procedure.
    /* This Procedure passes department number as a paramter to
    Report and displays Report.
    Author - Mr. Adinath R. Kamode
    Parameter - Deptname (p_dept)
    PROCEDURE CALL_REPORT (V_DEPT IN NUMBER)
              V_PLIST          PARAMLIST;               -
    - Parameter List and Name
              V_PLISTNAME           VARCHAR2
    (30) := 'RPTLIST';
    BEGIN
    -- Check existance of Parameter List
              V_PLIST := GET_PARAMETER_LIST(V_PLISTNAME);
              IF ID_NULL (V_PLIST) THEN
                   V_PLIST := CREATE_PARAMETER_LIST
    (V_PLISTNAME);
                   IF ID_NULL (V_PLIST) THEN
                             MESSAGE('Error in
    creating parameter list.');
                             MESSAGE('.');
                             RAISE
    FORM_TRIGGER_FAILURE;
                   END IF;
    -- Add parameter data , name must be same as in Report
         ADD_PARAMETER(V_PLIST,'P_DEPT',TEXT_PARAMETER,TO_CHAR
    (V_DEPT));     
    -- Don't display parameter Form
         ADD_PARAMETER(V_PLIST,'PARAMFORM',TEXT_PARAMETER,'NO');
    RUN_PRODUCT
    (REPORTS,'DEPT.RDF',ASYNCHRONOUS,RUNTIME,FILESYSTEM,V_PLIST,NULL)
    ELSE
              DESTROY_PARAMETER_LIST(V_PLIST);
    END IF;
    END;
    Adi

  • Passing parameters from FORM to REPORT

    Hello All,
    How to pass parameters from a FORM to a REPORT in Oracle Application Server Portal.

    Vamsi, Are u capturing the imputs for these parameters in the form??
    If u are capturing them in the form, then u need to add them to a parameter list (TEXT_PARAMETER) and while calling the report u can send it as a parameter in the RUN_PRODUCT call.
    Pls check the syntax for adding parameters and calling report from form in the form builder help.

  • How to handle user defined exception from C#?

    Hi:
    I have some PL/SQL code that will throw a user defined exception if certain conditions are met. How do I handle user defined exceptions if this procedure/function is being called from C#? C# can handle a normal Oracle SQL error (e.g. ORA-XXXX) because they are defined in the proper class, but how do I get it to know about my user defined exception? Does anyone have any links to examples of doing this?
    Thanks.

    Hi Gaff,
    Is there a particular problem you're having doing this? It works as normal for me...
    Cheers
    Greg
    PLSQL
    =========
    create or replace procedure throwsomething as
    begin
    raise_application_error(-20001,'kaboom');
    end;
    ODP
    =====
        class Program
            static void Main(string[] args)
                using (OracleConnection con = new OracleConnection())
                    con.ConnectionString = "user id=scott;password=tiger;data source=orcl";
                    con.Open();
                    using (OracleCommand cmd = new OracleCommand())
                        cmd.CommandText = "begin throwsomething;end;";
                        cmd.Connection = con;
                        try
                            cmd.ExecuteNonQuery();
                        catch (OracleException oe)
                            Console.WriteLine("caught " + oe.Message);
    OUTPUT
    ========
    caught ORA-20001: kaboom
    ORA-06512: at "SCOTT.THROWSOMETHING", line 3
    ORA-06512: at line 1

  • How to pass username and password from form to web service

    Hi All,
    We need to develop an offline interactive to form.
    When on desktop computer, the user has to click on button and it calls a web service (exposed via PI ) which updates the backend.
    But backend needs an authorised user for updation. We have a dummy user with authorisations.
    But how to pass the that username with its password to web service
    Please give your suggestions
    Regards,
    Aditya Deshpande

    i am closing this thread

  • Passing Parameters from Forms to Reports

    I created a report and a form. Create a param list. I'm trying to pass the parameters to the report when I'm doing run_product. The report comes up with the parameter screen.
    My problem is, as I am passing all the values what I need from the form, my report query should automatically query against these parameters and bring me the result.
    For example form is passing dept 49. My report should not display a parameter form asking me to type the dept number. It should take dept 49 in it's where clause for the query and return the result set.
    Can any one give me some suggestions ASAP. Very urgent.
    Thanks in advance.
    Asha

    ugandhar,
    please start looking at Run_Report_Object as using Run_Product to run Reports is desupported in Forms9i
    Frank

  • Error in passing parameters from Form to Report

    Hi All
    I am using 9ids
    I want to run report from a form
    From one procedure as
    vc_runformat:= 'htmlcss'; vc_reportserver:=:Global.repsrv;
    set_report_object_property(rep_id,REPORT_EXECUTION_MODE,BATCH);
    set_report_object_property(rep_id,REPORT_COMM_MODE,SYNCHRONOUS);
    set_report_object_property(rep_id,REPORT_DESTYPE,CACHE);
    set_report_object_property(rep_id,REPORT_DESFORMAT,vc_runformat);
    set_report_object_property(rep_id,REPORT_SERVER,vc_reportserver);
    set_report_object_property(rep_id,REPORT_OTHER,'comp_code='||:global.vc_comp_code||' vc_name='||cust_name||' inv='||inv||' invoice_no='||inv_no||' invoice_date='||inv_dt||' Paramform=no');
    vc_reportserverjob:=RUN_Report_Object(rep_id);
    vjob_id:=substr(vc_reportserverjob,length(vc_reportserver)+2,length(vc_reportserverjob));
    vc_rep_status :=REPORT_OBJECT_STATUS(vc_reportserverjob);
    if vc_rep_status='FINISHED' then
    web.show_document('/reports/rwservlet/getjobid'||vjob_id||'?
    server='||vc_reportserver,'_blank');
    else
    set_alert_property('alert_ok',alert_message_text,'Report failed with error message '||vc_rep_status||' !');
    al:=show_alert('alert_ok');
    end if;
    END;
    Report does not run
    now what i have found while rnd that
    when i pass a lot of userdefined argument
    it gives error.
    and if passed one,two,three userdefined argument than it works.
    in this example only
    when i passed
    inv='10016'
    dt='06-09-2003'
    inv_no='010016'
    comp_code='01'
    vc_name='PRODIMPEX'
    with these reports run fines but
    when i increase name data with one caharacter also it gives error
    say
    vc_name='PRODIMPEXR'
    report does not run.
    vc_name in report has character type with length 100
    but a lot of argument is to be passed more.
    I have also checked variable length. its fine
    i think there would be some setting in some report system file having the length of parameters
    which can be passed.
    please help me if u know this.
    thanks in advance

    Hi,
    this sounds familiar. Didn't you post exactly the same question a couple of weeks ago ? Don't remember what I replied to you, possibly to use varchar2 instead of character and give it a try. If this doesn't work, I remember that there is a way to use serverside command files for common parameters that needs to be passed. At least I can not find any bug filed against this. If the behavior doesn't change to teh better I therefore suggest to talk to customer support and file a bug.
    Frank

  • Passing parameters from Forms to Reports - Unhandled exception error

    Hi there,
    I am passing parammeters to my Reports through Forms. I am using the built-in RUN_REPORT_OBJECT to invoke and run my report.
    DECLARE
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    BEGIN
    repid := FIND_REPORT_OBJECT('MY_REPORT');
    SET_REPORT_OBJECT_PROPERTY(repid, REPORT_OTHER,
    'p1='&#0124; &#0124;to_char(:block.p1_field)&#0124; &#0124;
    ' p2='&#0124; &#0124;to_char(:block.p2_field)&#0124; &#0124;
    ' p3='&#0124; &#0124;to_char(:block.p3_field)&#0124; &#0124;
    ' paramfrom=no');
    v_rep := RUN_REPORT_OBJECT(repid);
    EXIT_FORM;
    END;
    In one of my reports, after the report was invoked on the previewer window and I closed it, an unhandled exception error message appears.
    Are there any restrictions on the length of REPORT_OTHER parameters/value, as in this form, there are quite a number of parameters set to passed into the reports?
    I did not encounter this problem when running the report using the default REPORTS PARAMETER FORM to pass in the parameter. It is only when I pass in through FORMS using SET_REPORT_OBJECT_PROPERTY, then the error appears.
    I did not encounter this error with other reports which have little parameters.
    Regards,
    Hon Koat

    Pang,
    Not sure it this will make the problem go away, but you could try to send the parameters in a parameter list, instead of setting the REPORT_OTHER values.
    The syntax is the same you use to pass parameter list from one form to another:
    declare
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    v_list paramlist;
    c_listname constant varchar2(30) := 'my_list';
    begin
    repid := FIND_REPORT_OBJECT('MY_REPORT');
    v_list := get_parameter_list(c_listname);
    if not id_null(v_list) then
    destroy_parameter_list(v_list);
    end if;
    v_list := create_parameter_list(c_listname);
    add_parameter(v_list, 'P1', text_parameter, to_char(:block.p1_field));
    add_parameter(v_list, 'P2', text_parameter, to_char(:block.p2_field));
    v_rep := RUN_REPORT_OBJECT(repid, v_list);
    end;Hope this solves your problem,
    Pedro

  • How to pass BI Query parameters from Function Module

    Hi,
    We are executing the BI queries using the Function Module "RS_VC_GET_QUERY_VIEW_DATA_FLAT" by passing the query name and the provider information.
    Is there a way, to pass the filter parameter values also to the query by using this function module? I am not sure how the VC  tool is using this Function Module to call the BI queries and passing the filter values.
    Your help is appreciated.
    Thanks
    Suri

    Suryanarayana,
    Are you trying to execute a query in batch?. If you want to execute try to look at WRITEQUERY - which is a standard SAP program. You can execute this program directly or you can customize it completely and produce the output in .CSV file.
    Hope this helps. Award points if useful.
    Goodluck,
    Alex (Arthur Samson)

  • Passing values as parameters from forms

    We are trying to use the On successful submission of a form area to forward to a report based on a value entered on the form.
    Is there a way to use a value from the form in the url?

    Here is the code I used. The code in bold allowed me to use the value entered on the form as a parameter for the report I am forwarding to.
    declare
    bidder_id number := 0;
    blk varchar2(10) := 'DEFAULT';
    begin
    bidder_id := p_session.get_value_as_number(p_block_name => blk,
    p_attribute_name => 'A_BIDDER_ID');
    go('PBR.SUM_REG_INFO.show?p_arg_names=pbr_bidder.bidder_id&p_arg_values='||bidder_id);
    end;

  • How to pass a bind variable from one SQL Report to Another

    Hello~
    I've created a link on one SQL Report page (Page 1). I would like a value from Page 1 used in the SQL on Page 2 to determine the result set. The Where Clause in SQL Query containing the bind variable is as follows:
    AND hp.party_name     = ':District_Account'
    When I run Page 1 and click on the link to execute Page 2, I get 'No Data Found'. The setup of the link is as follows:
    Column_Name = District_Account
    Link Text = #District_Account#
    Target = Page in this application
    Page = 2
    I'm a rookie working in V1.6...any help would be greatly appreciated!
    Thanks,
    Becky

    I don't see any parameter being passed in that URL. A little sample: http://htmldb.oracle.com/pls/otn/f?p=33203:4<br>
    when you click on the edit link the URL looks like this:<br>http://htmldb.oracle.com/pls/otn/f?p=33203:5:16073998852455071705::NO:5:P5_TABLE_NAME,P5_OWNER:PRESIDENTS_THEMES%2CBLUETEST<br><br>
    where P5_TABLE_NAME and P5_OWNER are the items and PRESIDENTS_THEMES and CBLUETEST are the values.<br><br>
    The SQL on the filtered report looks like:<br>
    SELECT *
    FROM all_tab_cols
    WHERE table_name = :P5_TABLE_NAME
      AND owner = :P5_OWNER<BR><BR>

  • Pass User Parameters between Forms and Reports...?

    Hi,
    I have been trying to pass user parameters from forms to reports using
    RUN_REPORT_OBJECT. I am able to run the report from the form, but still don't know how to pass user_parameters. Does anyone know how to do this?
    Thanks,
    AB

    You can use SET_REPORT_OBJECT_PROPERTY with the "REPORT_OTHER" parameter
    The following example passes 3 parameters to the report:
    SET_REPORT_OBJECT_PROPERTY(pt_report_object_id, REPORT_OTHER, 'paramform=no p_param_1='||pc_param_1||' p_param_2='||pc_param_2);

  • How to use user-defined packages in JAX-RPC web service

    I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
    package supercomputer;
    import Hello.*;
    public class SuperImpl implements SuperIF
    public String sendParam(String data)
    Temp ob=new Temp();
    int i=ob.get1(10000);
    return data+"returned by supercomputer";
    Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
    The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
    [echo] Running the supercomputer.SuperClient program....
    [java] java.rmi.ServerException: Missing port information
    [java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
    [java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
    [java] at supercomputer.SuperClient.main(Unknown Source)
    I dont know if it deploys why it gives error on client side.
    Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
    Please guide me in doing that.
    Thanks,
    Farrukh

    Farrukh,
    I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
    To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
    As I already said, I have doubts that your error should be originated from a missing class from your package, but:
    -try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
    -try to see if you can access your endpoint through your browser to see if there is a online status
    -display your config/WSDL file, and the steps you did to build your web service.
    regards,
    Pedro Salazar.

  • Passing date parameter from forms to report

    Hi,
    I'm using forms and reports 6i.
    I want to pass one date parameter from forms to reports.
    Using
    Add_Parameter(pl_id,'P_FROM_DATE',TEXT_PARAMETER,:FROM_DT);
    giving me error REP-0091- Invalid value for parameter 'P_FROM_DATE'
    This i think is because report expects date and here it is converted as varchar.
    Please help

    Hi Divya,
    Even I use this kind of statement
    Add_Parameter(pl_id,'P_FROM_DATE',TEXT_PARAMETER,:FROM_DT);and works fine for me.
    This i think is because report expects date and here it is converted as varchar
    Correct.
    Open the report in the builder and under Data Model -> User Parameters, Go to the Property Inspector of P_FROM_DATE. Under Parameter, set Datatype as Character instead of Date.
    Hope this should work. and tell me if it works(coz it wokred for me).

Maybe you are looking for

  • UseCompExpr Error while saving file in older format

    All, I have a sequence that: 1. Was Developed in TestStand 2.0.1 2. I am opened in TestStand 4.0.1 3. I want to save it back in version 2.0.1 WHY: Ease of use in newer TestStand GUI. But I get a UseCompExpr error >>> unknown variable Any ideas would

  • Black ops 2 Moderate Nat type - xbox 360 (BT HomeH...

    Hi, I currently have a moderate nat type on Call Of Duty Black ops 2 which i would like to change to open. I have followed the post by StephanieG but it is still moderate. Could you please advice me on how to change the nat type to open? thanks

  • Steps on Installing iPod Shuffle on Comp that has iPod Mini Installed

    I will be getting an iPod Shuffle soon and will be installing it on the same computer that already has my iPod Mini (2nd gen) installed. It's a PC and I'm running XP Home with iTunes version 6.0.1.3. I was just wondering if prior to getting the Shuff

  • How can I get extended warranty for my nokia 5800 ...

    How can I get extended warranty for my nokia 5800 express music  

  • Creating text datasource

    hi I have a standart datasource - 0EVENTGROUP_TEXT and created new infoobject in BW ZKVERUA_2. I must load the texts for the new IO using this standart datasource: 1. i tried directly in bw to create infosource that assign to DS 0EVENTGROUP_TEXT  but