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 the different levels at which oracle form services interact.
Is it possible to have multiple layouts in a report?
Can you convert a bit-mapped report to ASCII (character-mode) Report ? How ?
List out the oracle forms configuration files?
What is a matrix report and how many minimum groups are required to prepare the same?
all steps of bitmap report?
if some data is not transfered where it will get stored
what exactly u write in when_new_form_instance
what are the new features introduced in oracle form services in 11g release 2?
If the valueset if of type –TABLE then how many tables can we attach in the valueset ?
what are bind variables?
What is the difference between flex mode and confined mode?
i am writing a query select EmpNo from Emp how can i call in after parameter form
Explain the various types of oracle report?
why the Ctl file u put only in bin folder why not in other folder