Solved

How to execute rwrun with user parameters?

Posted on 2008-06-16
2
7,878 Views
Last Modified: 2013-12-19
I have daily/weekly/monthly reports to generate in pdf format.
Currently they are being run via Report Builder 10.1.2.0.2
These reports have 2 User Parameters for dates (START_DATE, END_DATE).

Is there a way to pass the 2 paramenters into the rwrun syntax?
Is rwrun the method to use?
rwrun REPORT=C:\report1.rdf DESTYPE=FILE DESNAME=C:\report1_MMDDYYYY.pdf DESFORMAT=pdf USERID=username/passwd@database

Open in new window

0
Comment
Question by:JayAZ
2 Comments
 
LVL 16

Accepted Solution

by:
Milleniumaire earned 100 total points
ID: 21792116
While rwrun does work with 10g, you should be using Oracle Reports Server which uses rwclient instead of rwrun.  The syntax for using rwclient is the same as rwrun, however you will have to have a Reports Server configured and running.

Both rwrun and rwclient tend to be run from the o/s command line so getting user defined parameters to them requires a user interface to be built.  This may be as simple as a shell script on unix which prompts the users for the parameters.

To pass the parameters to rwrun or rwclient, simply include the parameter names on the command line, for example, using your sample code:

rwrun REPORT=C:\report1.rdf DESTYPE=FILE DESNAME=C:\report1_MMDDYYYY.pdf DESFORMAT=pdf USERID=username/passwd@database START_DATE=dd-mon-yy END_DATE=dd-mon-yy

Obviously the format of the date values passed to the report depends on how you have defined these parameters in the report.
 

0
 

Author Closing Comment

by:JayAZ
ID: 31467515
date I needed to was in format mm/dd/yyyy
START_DATE="mm/dd/yyyy"     (with quotes)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now