Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stringing multiple reports together.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello all.
I am trying to string together several (read many/loads) reports on oracle reports builder. Is there any way of including some coding in each report so that when it is finished it runs another report? (The reports must be run in
a set order) I ask as the main report that is sent off is compiled of 30 to 40 smaller reports, and running them one after another is better than figuring out how to put them in one huge report. This However requires some skill which I don't have (mind you so do a lot of things). Any other
suggestions would also be appreciated.
Thanks for you help (being presumptuous and doing so in advance)
]/\Y




 
I'm not sure how to do this either, but The following might work as a work around or Botch job until someone comes up with a better solution.

I assume that these reports are kicked off on some PC somewhere? If so you must have something that sarts the firt one.

If you have Forms then you could write some code behind a button to run each report one after the other on the single click of a button, the report server would even queue each job nicely.

HTH,

Mike.
 
Continuous page numbers also possible ...

If you need all reports in the same report with
continuous page numbers, then this is possible by
declaring a variable in a package that you create.

It is then possible for Oracle reports to read the
next page number from the variable in the package each
time it starts a new report.

Cheers
GregB.

 
We have a similar situation where we use Oracle reports to generate a bunch of HTML pages which we drop in a place where the HTTP server can see them. (We also generate the index). The way we do this is to have a timed job (AT) that generates a batch file containing a set of RW file write instructions from a SQL script via SPOOL and which then executes the batch file via the host command. You can do this or just call a batch file to execute this as and when.

This is a cut-down example of how it is done. MyVar is a target variable on the report. Checkfield is a field in the table control_tab containing a list of selectable values in the target to be supplied to MyVar for the purposes of the select in the report. Obviously you can alter and extend this to use fields as filters etc.

First you need a batch file to run this lot - it should do the connection and call the generating sql script:

d:\orant\bin\plus80 me/my_password@my_db @myscriptname

The myscriptname.sql should look something like:

SPOOL OFF
DEFINE Orahome = 'c:\orant\bin\' -- or wherever
DEFINE ReportsDir = 'c:\orant\bin\' -- ditto
DEFINE DbName = 'whatever_db' -- whatever
DEFINE DbUser = 'bob/builder' -- whoever and pw

DEFINE Httphome = 'Q:\http\' -- wherever
DEFINE tempdir = 'c:\temp\'
DEFINE Tempdirbat = 'c:\temp\run.bat'


SET HEADING OFF FEEDBACK OFF TERMOUT ON ECHO OFF VERIFY OFF FLUSH OFF LINESIZE 1000

SPOOL &tempdirbat

SELECT '&Orahome'||'rwrun60 MyVar=''' || checkfield || '''' ||' PARAMFORM=NO DISABLEPRINT=YES DESTYPE=FILE DESNAME=&httphome'|| checkfield ||'.htm DESFORMAT=HTML
BATCH=YES REPORT=&ReportsDir'||'TestReport.rdf'||' USERID=&dbUser'||'@'||'&dbName' FROM control_tab;

spool off;

HOST &tempdirbat;
DISCONNECT;
EXIT;

That's about it. You can obviously do this for any other sort of output like HTMLCSS, acrobat reader, text etc. Alternatively you could just hard code everything into the run batch file and call it by hand....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top