Passing variables from form to report.

I have a portal form that goes to a report on submit. I need to pass a couple of variables from the form to the report for display. How do I do this?

Hi Sharmila
thanks for that, the thing is I've tried this and it doesn't seem to work.
My report fields are :p_property and :p_event.
The code in my form is:
declare
l_property_reference VARCHAR2(20);
CURSOR get_event_reference IS
SELECT max(event_reference)
FROM eh_event
WHERE property_reference = l_property_reference;
event_v VARCHAR2(10);
begin
l_property_reference := p_session.get_value_as_varchar2(p_block_name=>'DEFAULT', p_attribute_name => 'A_P_PROPERTY');
OPEN get_event_reference;
FETCH get_event_reference INTO event_v;
CLOSE get_event_reference;
go('mobileweb.rpt_prop_event_success.show?p_arg_names=p_property&p_arg_values='||l_property_reference||'&p_arg_names=p_event&p_arg_values='||event_v);
end;
The report gets called but the fields are blank.
Rich

Similar Messages

  • 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

  • Error While Passing Parameter from Form to Report

    I am using Dev 9ids. And i am compiling every forms from form 5 to form 9i. and report too.
    Most of reports are running.
    in some i am getting problem where i do pass more than 5,6 parameters.
    for e.g in one case say
    set_report_object_property(rep_id,REPORT_OTHER,'comp_code='||:global.vc_comp_code||' inv='||inv||' invoice_no='||inv_no||' invoice_date='||inv_dt||' vc_name='||cust_name||' Paramform=no');
    this will not run and give error FRM-41214
    when i exclude vc_name or shorten the value of cust_name report run fine.
    length of cust_name and in report vc_name is proper.
    I also need to pass more parameters to report.
    I do think there might be parameter size in any of report system files to be increased.
    Pls help me out how to rectify this problem.
    thanks in advance.
    raj

    You are not getting the result in the report because you have chosen the button event as Query.
    Edit the form, for the Execute button, choose the button event Custom and use the same pl/sql code that you have used before.
    If the event is Query, then the session object does not have value of A_EMPNO at the point where you have written your code. The session object is populated after the Query event has taken place.

  • 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.

  • Passing Queries from forms to reports

    Hi to all,
    I am facing a problem in forms and report 6i. A report is having two queries namely Q1 and Q2 with data link (join) on two columns. At report level it is working fine but when i am passing Q1 and Q2 from a form it is doing a cartesian join means if Q1 returns 5 rows and Q2 returns 10 rows then the output is like 1st row from Q1 and 10 rows from Q2, 2nd row from Q1 and 10 rows from Q2 and so on.
    Then data link (join) set at report level is not working.
    Please give the solution for the above problem.
    And is there is any way to pass data link using forms.
    Thanks

    Hi,
    I don't have 10g right now, so can't test it...
    Isn't it possible to just put the params you won't show to your users 'behind' other objects on the param form?
    Strange behaviour anyway, in 6i Reports does not seem to care wether the params are on the form or not.
    Rgds,
    Guido

  • 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

  • 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='| |to_char(:block.p1_field)| |
    ' p2='| |to_char(:block.p2_field)| |
    ' p3='| |to_char(:block.p3_field)| |
    ' 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

  • 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 DATA FROM FORM TO REPORT (how to on the same page?)

    Hello everybody
    yes, i know it is built in a two pages design where the first holds the form and the second the report, but I want it both on the same page so that one can see what he has on the report while adds his own row to the table. Well I could do creating a form and then editing the page and then add another region. Alright. But then i dont know how to relate them together so that the data pass from the form to the report.
    Besides, the Form for filling the data needs to pass them to two separate tables, because one table contains the particulars of the location and the other the comments about each store. Easy to do that on PHP and mysql but here I am lost.
    Second thing that is driving me nuts is that I created a table named location so as to street postcode for a store, and another one for evaluation so that customers or workers add a a row evaluating services etc.
    Well, I am trying to create that form i first talked about that would hold all the fields and I am doing it out of a SQL query that picks the definitions from both tables. My XE is completely empty from any leftovers of other applications etc. I make the equijoin alright
    select l.loc_id, l.company, l.postcode, l.street,l.town, e.eval_id, e.loc_id, e.locum_reg, e.date_booked, e.items, e.addicts, e.number_staff, e.attitude_staff, e.organisation, e.stock_filing, e.agency
    from location l, evaluation e
    where l.loc_id = e.loc_id
    and i get this annoying error all the time
    ORA-20001: Unable to create form on equijoin. ORA-20001: Error page=2 item="P2_LOC_ID" id="1324114494879878" ORA-20001: Error page=2 item="P2_LOC_ID" id="1324114494879878" has same name as existing application-level item. ORA-0000: normal, successful completion
    well, if that form is made up of both tables, it will definitively have to have something in common with them! how is the item name suppose to have another name? it is made with the wizzard so supposedly the wizzard should know it but I have tried for two days 14 hours each day.
    any indication as to how solve this would be priceless for me
    thank you
    Alvaro
    =========================================================================================================
    Edited by: user12155340 on 14-Nov-2009 03:38

    I'm just guessing, but it appears since you are selecting loc_id twice (once from each table) there are two items generated called P2_LOC_ID, and that's simply not possible (well - how would the application know which one you mean if there could be two with the same name?).
    Maybe it's worth trying the following:
    select l.loc_id as "L_LOC_ID", l.company, l.postcode, l.street,l.town, e.eval_id, e.loc_id as "E_LOC_ID", e.locum_reg, e.date_booked, e.items, e.addicts, e.number_staff, e.attitude_staff, e.organisation, e.stock_filing, e.agency
    from location l, evaluation e
    where l.loc_id = e.loc_id
    Another option is creating a view on the two tables (of course you must use 2 different column aliases for the two loc_id columns in the view too, otherwise you will receive an ORA-00957: duplicate column name) and use the view for creating reports and forms - however, automatic row processing works just on one table, so you would have to create your own processes to perform the DML...
    Edit: I just saw you already got this answered in the APEX forum.
    Holger
    Edited by: schweich on Nov 18, 2009 7:58 AM

  • PASSING DATA FROM FORM INTO REPORT (how to on the same page)

    Hello everybody
    yes, i know it is built in a two pages design where the first holds the form and the second the report, but I want it both on the same page so that one can see what he has on the report while adds his own row to the table. Well I could do creating a form and then editing the page and then add another region. Alright. But then i dont know how to relate them together so that the data pass from the form to the report.
    Besides, the Form for filling the data needs to pass them to two separate tables, because one table contains the particulars of the location and the other the comments about each store. Easy to do that on PHP and mysql but here I am lost.
    Second thing that is driving me nuts is that I created a table named location so as to street postcode for a store, and another one for evaluation so that customers or workers add a a row evaluating services etc.
    Well, I am trying to create that form i first talked about that would hold all the fields and I am doing it out of a SQL query that picks the definitions from both tables. My XE is completely empty from any leftovers of other applications etc. I make the equijoin alright
    select l.loc_id, l.company, l.postcode, l.street,l.town, e.eval_id, e.loc_id, e.locum_reg, e.date_booked, e.items, e.addicts, e.number_staff, e.attitude_staff, e.organisation, e.stock_filing, e.agency
    from location l, evaluation e
    where l.loc_id = e.loc_id
    and i get this annoying error all the time
    ORA-20001: Unable to create form on equijoin. ORA-20001: Error page=2 item="P2_LOC_ID" id="1324114494879878" ORA-20001: Error page=2 item="P2_LOC_ID" id="1324114494879878" has same name as existing application-level item. ORA-0000: normal, successful completion
    well, if that form is made up of both tables, it will definitively have to have something in common with them! how is the item name suppose to have another name? it is made with the wizzard so supposedly the wizzard should know it but I have tried for two days 14 hours each day.
    any indication as to how solve this would be priceless for me
    thank you
    Alvaro

    This should be so:
    A person goes to work to place A
    At the end of the day, he or she goes into the web fills the form and clicks the botton. Then, he or she has added a row to the form. As simple as that. But bear in mind that that form is comprised of data about the address and the comments, which are completely different entities, and not all elements of each entity is to appear in the report. That is why they have to go to two tables on the background and then the report pick from each table what it wants to show publiclly.
    What I am actually trying to do is passing the values from the form into the two separate tables Location and Evaluation. Then I have already placed a select query under the report and I have seen that it updates itself as I manually filled the two tables so this process works fine. What I need is, instead of filling the tables manually as I am doing, fill them through the completion of the textfields of the form. This is so because not all the fields have to be shown on the report, for example, the person reporting will remain anonimous and that is something I am able to do by simply not including him in the select query of the report.
    I am like exploring now the edit page possibilities and indeed I have discovered that the button of the Form that says create is associated with a Insert request on the database. Also i have seen that the way this works is by something like this P3_POSTCODE, &P3_POSTCODE where P3 is the item and &P3 is the value that is in the textfield associated with that item name.
    Edited by: user12155340 on 14-Nov-2009 11:05

  • Passing variables from Report to Form

    Hi, I need pass a couple of variables from the REPORT to two fields in the FORM for save in a table. Somebody knows how do I do this?. Any suggestions?
    Thanks a lot!
    I think that this situation is different that pass variables from FORM to REPORT.

    You need to use a Link component to your Form that you then attach to one of the data columns in the Report. When you edit the link in the report, you can specify the fields to pass.

  • 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).

  • Pass a shared variable from a sub-report into cross-tab

    Hello everyone!
    I need to pass a calculated value in a shared variable from a sub-report into a croos-tab in the Group footer of the main report. When I place this variable in the group footer I can see the value, when I use this variable in the Cross-tab, it is 0.
    In the Sub Report:
    whileprintingrecords;
    shared numberVar Total_SF;
    Total_SF:= calculation.
    In the Main report:
    whileprintingrecords;
    shared numberVar Total_SF;
    In the Cross-Tab I am using the above formula from the main report.
    Do you guys know what I need to do for this to work?
    Thank you,
    T.

    Hey Tat,
    I have learned to avoid passing shared variable from sub reports back to main reports.  You just always seem to run into issues with execution order.
    Personally, I try to create a shell report and add sub reports, calculating the values I need in the first sub report and pass the values to subsequent sub reports using shared variables.  I'd recommend thinking about arranging your reports like this during your design time.  It has saved me some headaches.

  • Forms 6i - Types of parameters, which can be passed from forms to reports?

    Hello all,
    Can somebody tell me about
    Types of parameters, which can be passed from forms to reports?
    plzz

    Please ask this question in the appropriate forum for [url http://forums.oracle.com/forums/forum.jspa?forumID=82]Oracle Forms.
    Regards,
    Rob.

  • Passing variable from one JSP to another

    Hi....
    I am working on customizing Oracle Application(istore).
    I need to pass variable from 1 JSP to another.
    JSP 1 contains the following line of code:
    <INPUT type="HIDDEN" name="soldtoCustPartyName" value="<%=soldtoCustPartyName%>">
    How can I pass this to another JSP Page. The other JSP should take the 'soldtoCustPartyName' and find out the primary address country.
    So please help me in getting variable passed from 1st JSP to next.
    By default, 1st JSP is not fwded to 2nd JSP.
    This is very very urgent...Please help.....

    When you push the submit button on jsp1 - it goes to jsp2?
    ie
    // in jsp1.jsp
    <form action="jsp2.jsp">
    <INPUT type="HIDDEN" name="soldtoCustPartyName" value="<%=soldtoCustPartyName%>">
    <input type="submit">
    </form>
    //Then in jsp2.jsp all you need is
    request.getParameter("soldtoCustPartyName");This will pick up the value that is coming from the hidden field on jsp1

Maybe you are looking for