Home » Developer & Programmer » Reports & Discoverer » parametric report
parametric report [message #89756] Mon, 19 July 2004 01:55 Go to next message
siva
Messages: 58
Registered: August 1999
Member
I am trying to build a report having two parameters. I want to populate second parameter based upon the first one.
For example I am having two fields
Deptno
And
Empno
If I give value of parameter deptno 20. I want only those record in empno list of value who belong to deptno 20.
Can any one help me?
Even I am looking for it [message #89765 is a reply to message #89756] Wed, 21 July 2004 16:16 Go to previous messageGo to next message
Antro
Messages: 10
Registered: March 2004
Junior Member
Hello All,

I have a requirement, there are two drop down boxes in the parameter form, depending upon the value I select in first drop-down box the second drop-down box's values should change dynamically.

I am using Reports 6i, can anyone please let me know whether this is possible to do it? If so can you please let me know.

This is an immediate request, any reply is greatly appreciated.

Thanks in advance,

Antro
Re: Even I am looking for it [message #89767 is a reply to message #89765] Wed, 21 July 2004 20:48 Go to previous messageGo to next message
Gurusubramanyam
Messages: 79
Registered: July 2001
Member
Hi,

Please use forms6i to design the parameter form and pass the parametes from forms to the report.The Report6i parameter form is having certain limitations.You can define the parameter form in Forms 6i and using the "Run_Product" builtin call the reports with parameters.You can do all types of validations in forms.Hope this will solve your problem.

Thanks & Regards,
B.Prasad
Re: Even I am looking for it [message #89774 is a reply to message #89767] Thu, 22 July 2004 07:28 Go to previous messageGo to next message
Antro
Messages: 10
Registered: March 2004
Junior Member
Prasad,

Thank you very much thats a fantastic idea!

I am trying to understand how this will work! So we will not be having the parameter form in reports? How do we set the bind variables to the parameters we pass from the form to reports? In other words, how does the reports get form parameters.

It is clear that we call the report with the paramters but where and how do I catch those parameters in report?

Thanks for your precious time,
Antro
Re: Even I am looking for it [message #89778 is a reply to message #89767] Thu, 22 July 2004 18:33 Go to previous messageGo to next message
siva
Messages: 58
Registered: August 1999
Member
hi:
thank u so much. I zm going 2 try it now
Re: Even I am looking for it [message #89780 is a reply to message #89774] Fri, 23 July 2004 02:49 Go to previous message
Gurusubramanyam
Messages: 79
Registered: July 2001
Member
Hi,

Please you can refer the "RUN_PRODUCT" syntax examples in forms6i help.It is not difficult as you think.
Just check the following code for calling a report from froms6i with out reports parameter form.

/*
** Built-in: RUN_PRODUCT
** Example: Call a Report Builder report, passing the
** data in record group 'EMP_RECS' to substitute
** for the report's query named 'EMP_QUERY'.
** Presumes the Emp_Recs record group already
** exists and has the same column/data type
** structure as the report's Emp_Query query.
*/
PROCEDURE Run_Emp_Report IS
pl_id ParamList;
BEGIN
/*
** Check to see if the 'tmpdata' parameter list exists.
*/
pl_id := Get_Parameter_List('tmpdata');
/*
** If it does, then delete it before we create it again in
** case it contains parameters that are not useful for our
** purposes here.
*/
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
/*
** Create the 'tmpdata' parameter list afresh.
*/
pl_id := Create_Parameter_List('tmpdata');
/*
** Add a data parameter to this parameter list that will
** establish the relationship between the named query
** 'EMP_QUERY' in the report, and the record group named
** 'EMP_RECS' in the form.
*/
Add_Parameter(pl_id,'EMP_QUERY',DATA_PARAMETER,'EMP_RECS');
/*
**Pass a Parameter into PARAMFORM so that a parameter dialog will not appear
**for the parameters being passing in.
*/

Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
/*
** Run the report synchronously, passing the parameter list
*/
Run_Product(REPORTS, 'empreport', SYNCHRONOUS, RUNTIME,
FILESYSTEM, pl_id, NULL);
END;

Hope this will be helpful to u.

Bye,
B.Prasad
Previous Topic: migrate reports from discoverer 3.1 s to discoverer 9i AS
Next Topic: Report .rep on different machine
Goto Forum:
  


Current Time: Wed Feb 28 11:09:45 CST 2024