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

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

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

  • 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 parameters from Forms6i to Reports.

    Hi,
    I have table STATUS with fields STATUS_NO, DESCR
    I am using the following code in when button press trigger for passing parameter from Form 6i to Reports at runtime.
    DECLARE
         repid REPORT_OBJECT;
         v_rep VARCHAR2(100);
    BEGIN
         repid := find_report_object('rep1');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no status_no='||:ST);
    v_rep := RUN_REPORT_OBJECT(repid);
    END;
    When I press the button and enter value 1 in ST Text item it display a blank page (no data) of report.
    I am using the following Query .
    select status_no,descr from status
    where status_no=:st
    please send me the solution of this problem on urgently basis.
    Best Regards,
    Shahzad

    My first guess is that the parameters are not matching:
    you are setting the parameter status_no when calling the report but the report will be expecting a parameter called st.

  • How to send more than one parameter from FORM to REPORT?

    Dear all,
    i can send one parameter from FORM to REPORT. but when i send more than one parameter it gives error: frm 41214 unable to run report.
    here is the code i think the error is in the following line of procedure:
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_date_from='||v_date_from||'p_date_to='||v_date_to);
    where to place the parameters and is there any space is required?
    Thanks
    Muhammad Nadeem

    Dear Saeed Iqbal,
    thanks for you reply.
    dear i am using Form 10g run_product is not supported in this version.
    i am using RUN_REPORT_OBJECT.
    PROCEDURE rep_gl_ledger IS
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(50);
    v_date_from date;
    v_date_to date;
    v_detail_id_from varchar2(100);
    v_detail_id_to varchar2(100);
    v_voucher_type varchar2(100);
    --req_no char(17);
    BEGIN
    v_date_from :=      :ledger_para.p_date_from;
    v_date_to :=      :ledger_para.p_date_to;
    v_detail_id_from :=      :ledger_para.p_detail_id_from;
    v_detail_id_to :=      :ledger_para.p_detail_id_to;
    v_voucher_type :=      :ledger_para.p_voucher_type;
    repid := find_report_object('gl_ledger');
    --repid := find_report_object('REPORT80');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'pdf');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_online_FRHome');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no p_date_from='||v_date_from||'p_date_to='||v_date_to);
    --SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no');
    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
    /* Display report in the browser */
    WEB.SHOW_DOCUMENT('http://'||:GLOBAL.G_IP||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?','_blank');
    ELSE
         message('Error when running report');
    END IF;
    END;
    Regards:
    Muhammad Nadeem

  • Graphics from Forms or Reports

    When I am running graphics from forms or reports either using the chart wizard or by run_product built-in, I am getting error message OG-01603: UNABLE TO CREATE PL/SQL DEVELOPMENT ENVIRONMENT CONTEXT
    I am using Developer 6i.
    Please help me out.
    Thanks
    Zulqarnain

    I have tested on my pc it is perfectly working.
    Please check before installations..
    Is there any other oracle product is running in the same machine?
    1. Are you installing Dev 6i in a machine where Oracle database(8.0 or 8i) is installed?
    2.First shutdown the database. Stop the oracle services running.
    3. Then start installing Dev 6i in a different oracle home.

Maybe you are looking for

  • No PasswordCredential found when off network

    Hello, I am using Netbean 3.6 with Sun's app server 8 bundled. I also have the Oracle 9 database installed on my laptop. I am trying to do some development on my laptop while not connect to the network. When I am connect, everything works fine. When

  • DBMS_SCHEDULER.CREATE_JOB executing a shell script

    Hi , Shell script :-  TEST.ksh #!/bin/ksh dhxmlfile=`date +"%Y-%j-%R"` dhoriginfile= /A/XMLFirstTest.xml dhdestinationfile=/A/B cp $dhoriginfile $dhdestinationfile/$dhxmlfile rm $dhoriginfile BEGIN DBMS_SCHEDULER.CREATE_JOB (job_name=>'TEST.ksh',   j

  • Set Commodity Code in Purchase order

    hello, I have implemented a BADi for purchase order for updating the commodity code/weight and Volume from material configuration. It works fine with updating for weight and volume. But when trying to update the Commodity code I got a "time out" beca

  • Restore contacts from deleted iclooud

    i did a really stupid thing !!! i wanted to delete the contacts from i cloud and put a new contacts from my phone to the cloud , i deleted contacts from i cloud then i didn't see any contacts from my phone !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • Website in applet help-actionListener

    import java.applet.*; import java.awt.*; import java.awt.event.*; public class MainIndex extends Applet implements MouseListener {      Image header;      Image home;      Image halo;      Image java;      public void init() {           header = getI