RPTRender Run Time Switches

 

The Report Renderer supports switches that enable values to be passed to it at run time. These switches and a description of their use are provided below:

    -databaseURL=

    • Establishes the connection to the database:

    -databaseURL=odbc:///

    • Contacts connects to the database through the ODBC connection called “contacts”

    -username=

    • The database username

    -passwd=

    • The database user’s password

    -loadfromdb=

    • Specify the name of the report you want to load from the database

    -noAuth

    • Indicates that no username and password are required as is typically the case when this information is defined in the ODBC connection

    -print

    • The presence of this switch simply opens the operating system’s print dialogue immediately upon opening the Report Renderer

    -printerName=

    • The value of this switch is the name of the printer that is selected automatically when the operating system’s print dialogue is opened. This example, -printerName="Laser6l" will automatically select the client computer’s printer with the name Laser6l.

    -param=

    • Establishes a parameter, its type and its value. For example -param=Caller_ID:string='3' establishes a parameter called Caller_ID of type string with a value of ‘3’. This example, -param=show_inactive:bool='Y' establishes a parameter called “showInactive” of type boolean with a value of ‘Y’ -print

    -pdf

    • Specify you want to print results to .PDF format

    -outpdf=

    • Specify the .PDF file location and file name

    -close

    • The presence of this switch simply closes the Report Renderer after the user prints or cancels printing.

You specify the -param option once for each parameter.

Example:

rptrender.exec -param=startDate:string'04/01/2008'
-param=endDate:string='04/30/2008'