Answer Posted / muzammil sabir
The report can be run from the forms in simple steps... i will show you how to run report from forms by passing a parameter to the report :
1.Create a report with the desired fields which you want to show..now go to the reports and create a user parameter named p_serial_no.
2. Then create a print button on your form and then write this code in the WHEN-BUTTON-TRIGGER of the button. I have added comments to explain the code
/*
** Declare a variable of type ParamList to store
** the Parameter list ID
*/
DECLARE
temp_id paramlist;
BEGIN
commit;
/*
** Create a Parameter list named "V_A"
*/
temp_id := CREATE_PARAMETER_LIST('V_A');
/*
** Add two Parameters to the list to pass values for each
** user-defined Parameters defined in the target form; for each
** Parameter, specify its key, type (text or data), and value
*/
ADD_PARAMETER(temp_id,'p_serial_no',text_parameter,to_number(:e_fee.fee_id,'999999999999'));
/*
** Pass a Parameter into PARAMFORM so that a parameter dialog
will not appear
** for the parameters being passing in.
*/
ADD_PARAMETER(temp_id,'paramform',text_parameter,'NO');
add_parameter(temp_id,'MAXIMIZE',TEXT_PARAMETER,'YES');
add_parameter(temp_id,'DESNAME',TEXT_PARAMETER,'PRINTER');
/*
** Run the report synchronously, passing the parameter list
*/
run_product(reports,'F:\Education\feevchr2.rdf',synchronous,runtime,filesystem,temp_id);
destroy_parameter_list(temp_id);
end;
2.A..... Replace the name of the primary key field which you have in your form or any other field in the above code where :e_fee.fee_id is written
2.B..... replace the path of the report file which you created earlier in the above code where 'F:\Education\feevchr2.rdf' is written.
................That's it when you will click the print button on form, it will invoke the report which you have created and it will be according to the field of wich you have passed the parameter..................................
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain master-detail relationship with some examples.
What do you understand by oracle forms?
What is the difference between flex mode and confined mode?
List out the oracle forms configuration files?
hiding item in report how like that properly,thats manually but at runtime i want to do
in user parameter property we have list of values.can we write select query for binding? for example:: select empno from emp where deptno=:deptnum :deptnum is first parameter it displays distinct dept nos. if i do like this it is giving error:: bind variables are not allowed in the select statement
What is an oracle report?
I need a query to list out "Subinventory Transfer" record from Oct 2016 to Oct 2017 for few users
if some data is not transfered where it will get stored
did u received a single file or multiple files
How to create Drill down report?
How can we generate report output in excel format?
what is the difference between call_form, new_form and open_form?
In workflow how can we send a notification to the Supplier giving the Corresponding report Details.
Name the different triggers supported by oracle reports and their firing order.