Query from Form to Report
I've been reading on the forum's about parameter passing between
porlets, between form and report, and such, but I can't get the
example code to work correctly in my situation. I would be much
appreciative if someone could describe the best way to handle
the following. I want to setup a Form to allow queries that
result in a report. I have a page with two portlets, the Form
and the Report. The report has bind variables for the search
criteria. How do I take the info in the Form, and have the page
reload with the correct information in the bind variables of the
Report?
Dear, i have tried it in the form 6. i just create a parameter
list and pass it to report. in reports creat the same user
parameters. they will be receive autometically. then u can use
them in ur query.
try it.
bye that's what i thought, i've seen people talk about using
run_report_object(), run_product(), and open_form(), and i'm
confused as to which is the correct way to have the page reload.
Similar Messages
-
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 helpHi 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). -
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 NadeemDear 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
ZulqarnainI 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. -
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?
plzzPlease ask this question in the appropriate forum for [url http://forums.oracle.com/forums/forum.jspa?forumID=82]Oracle Forms.
Regards,
Rob. -
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 -
Change Reports query from Form
Hi,
Can I use PL/SQL in a Form to modify or add to the Report's query in runtime?
i.e
If a Text Item in a form was left blank in then I would like to modify the WHERE clause
in the Report to remove one of the parameter defined.
in Report's query
WHERE a.myfield >= :p_1 and a.myfield <= :p_2
become
WHERE a.myfield >= :p_1
if the Text Item in form (for p_2) was left blank.
Any help would be greatful.
Many Thanks,
BuntoroHi,
you can use lexical parameter to do this thing
It's better if you change your query to
select * from emp where &where_clause
here,
where_clause is a parameter with some default value. U must give some default value to it.
ans then pass this parameter from form..
hope it will help you...
... -
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.
rajYou 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 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.
Ashaugandhar,
please start looking at Run_Report_Object as using Run_Product to run Reports is desupported in Forms9i
Frank -
Data migration from Forms to Reports
Hello,
Does anyone know how to migrate numerous data from Oracle forms to reports, without using parameter lists or parameters, and also withour the use of temporary tables since my platform is 8.0.6 and forms 4.5?
Thanks for any replieshi daniel,
you could write your data from forms into a text file. seperate
the values using for example a comma (or something else).
use the text datasource in reports 9i to query directly from
this file.
find more information here:
http://otn.oracle.com/products/reports/htdocs/getstart/examples/textPDS/index.html
regards,
christian -
VERY URGENT!! How to Pass a "% " symbol from form to Report
Hi
I am using oracle 10g and passing a symbol "%" as a parameter to the report from a form. But it shows error as follows:
REP-52006: Failed to decode the specified URL PARAMETER1=%.
But it is working when it runs in the Report directly.
Then Why we can't pass the symbol "%" to the report from form.
Please reply me as soon as possible. IT IS VERY URGENT !!Hi,
Try using a lexical parameter(&parm_1) for a string of values or a bind parameter(:parm_1) for a single value
Thanks,
Kimosabe -
From form calling report to result to pdf file
Dear All,
Usually, when we call a report from form, it calls to preview. Now, I would like to autometically call the report and upon execute, the pdf file will be created. Can anybody tell me how to do that.
p/s: I do not want the preview becasue this report is a complicated report and it takes quite some time to process. So I would like my user to get the pdf directly instead of going though the preview.
ThanksDECLARE
pl_id ParamList;
Begin
pl_id := Create_Parameter_List('Reports_Parameters');
Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'FILE');
Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER,'C:\aRep1.Pdf');
Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER,'PDF');
RUN_PRODUCT REPORTS,'C:\Rep1',SYNCHRONOUS,RUNTIME,FILESYSTEM,pl_ID);
Destroy_Parameter_List(pl_id);
End; -
Passing where clause with spaces from forms to reports
Hi,
Has anybody passed where clause as lexical parameter with spaces from forms to preports..
I have seen people mention that, we can replace the spaces with special characters and then replace it again in the before trigger report..does anyone have a working example of that??
Thanks.i solved the issue..
i had written the procedure in the before report
trigger instead of writing it in the before parameter
form trigger..
it works perfecto now..
Thanks.We had removed the spaces and used commas to delimit each item.
So you are saying spaces are not a problem in 10g? -
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.
ThanksHi,
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
Maybe you are looking for
-
CRM Pricing error after 5000 seconds with CRM_ORDER_MAINTAIN in background
Hi, This is Rajender. I am using function module CRM_ORDER_MAINTAIN to create sales order. I am facing a error while creating sales order from text file. while uploading 15000 records it is taking more than 5000 seconds. But after 5000 seconds the ba
-
How to change screen refresh rate in windows 7sp1 and windows 8.1 iso image using dism
sir when i install windows 7sp1 and windows 8.1 then after the completion of setup when first time windows boots up then task bar is not shown and display is not clear and when i check under monitor settings the screen refresh rate is 60 Hertz and wh
-
Hard drive issues; how to run hardware test
A couple of weeks ago my hard drive experienced what I would call "minor crashes". The computer booted up to the grey box with the question mark, and would do nothing more. The hard drive also made unpleasant noises. I think I got it back by resettin
-
Hi all, I wrote a customer exit and debugged that and the coede was working fine but i am not able to see the result in the query.Can anyone of you suggest what are the possible causes for this.
-
Product Category Hierarchy - SRM
I have doubts on Product Category hierarchy.... 1) As far as i understand whenever we replicate the material from Backend R/3 there is a product hiearachy created and assigned automatically. However, we also have the option of creating local hiearach