Skip to Main Content
  • Questions
  • running a report in d2k forms 5.0 from the menu

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, tushar .

Asked: May 02, 2000 - 1:21 pm UTC

Last updated: April 15, 2004 - 8:35 am UTC

Version:

Viewed 1000+ times

You Asked

Please tell me the procedure to run a
report ( .rep or .rdf) in D2k forms 5.00
from then menu.

when I use Run_product built-in the
error is:
'too many declarations mach this call.'

The syntax I use for running
x.rep report is :
run_product(reports,'c:\temp\x.rep',asynchronous,runtime,filesystem,null);




and Tom said...



You are missing the parameter list parameter. There are 7 inputs into run_product and you have only 6.

declare
pl_id paramList;
begin

...
Run_Product(REPORTS, 'empreport', SYNCHRONOUS, RUNTIME,
FILESYSTEM, pl_id, NULL);
....
end;

would be a valid call to run_product.

Here is the full example:

/*

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

Thanks
--

Thomas Kyte asktom_us@oracle.com
Reston VA
</code> http://asktom.oracle.com/magazine-archive.htm <code>






Rating

  (7 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Generating to file loses param list

Running in Circles, March 28, 2002 - 4:47 pm UTC

Hi Tom,

I am using run_product with a number of parameters that restrict the data returned in the report (v6). Once the report displays in the previewer I choose to generate it to a file (PDF) it then generates this report based on the initial values for the parameters instead of the ones it was passed?

Is there some way, from the previewer to have it generate the file using the received parameters, or to save to file the report in the previewer?

Thanks so much!

parameter passing to reports....

Kiran Shah, April 16, 2003 - 5:43 am UTC

How to pass comparatively large no. of inputs.(About 50-60 no. of inputs) to report
using run_product ?
These parameters includes text fields, date fields,nested tables and lob fields.

what is the better way to implement this ?

Should I use forms for all these inputs and call report from form ?
But then how to pass these parameters ?(especially nested tables and lob fields) ?

Or should I use parameter form facility of Reports ?
(I don't know whether parameter form supports Nested tables, field validation, LOV etc.)

Or any other solution ?(Like in HTML/Java/PHP)

We are using Oracle 8i, Report & Form 6.0

Thanks,
Kiran

Tom Kyte
April 16, 2003 - 10:11 am UTC

sorry -- never wrote a report in my life.

try otn.oracle.com -> discussion forums. lots of people hanging out in the developer discussion group.

for Kiran

Riaz Shahid, April 16, 2003 - 10:47 am UTC

Hi there !

When you run the report...you should also ask the user what kind of putput he is wanting (e.g; screen, printer, PDF/HTML ect converted file). So that when u run the report, it will be run as u wanted.

You will have to pass those parameters thru form(better way). Report has LOV but no much more validatation can be done.

Regards

Regards

Problems with Report Builder Dec. 2k

Ramón Alejandro Berrones Cruz, February 18, 2004 - 9:06 pm UTC

I have a report and in the screen preview all the information is fine; however when I print it some letters disappear on the left side of the fiel. I don't know How to correct this. I tried with the properties that allows to fields expand them in an horizontal and vertical way. But it doesn't work. How can I get WYSWYG ("What you see What you get") in a print form?... Could be possible that it is a Report Builder bug and How I can correc this?... I need help...

Thank you very much

Tom Kyte
February 19, 2004 - 8:25 am UTC

please contact support for something like this.

Problems with Report Builder- Developer 2k

Ramón Alejandro Berrones Cruz, February 23, 2004 - 8:30 pm UTC

Thank you very much for your response!

However it is difficult to understand that a Report that was made it in Report builder has problems of software support, because it is a common task to make reports in Databases. Did you ever hear about this kind of troubles specifically on Report Builder? or maybe I'm creating the reports in a wrong way.

Best Regards


how i display the report name at run time

eng.tarek zan elabden ahmed yousef, April 13, 2004 - 9:16 am UTC

hello tom,
i want to display the report name with extension (rdf)
at the run time on the report
please tell met the seteps in details

Tom Kyte
April 13, 2004 - 10:52 am UTC

no idea, i don't do reports.

feature of oracle 10

tarek, April 15, 2004 - 6:18 am UTC

tell me the new feature of the new version of oracle10


More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library