RPTRender Run Time Switches

The report rendering engine for OpenRPT supports multiple switches, which you can pass to the renderer at run time. This article lists those switches and provides descriptions for each.

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:

Establishes the connection to the database

-databaseURL=

Connects to the database through the ODBC connection

-databaseURL=odbc:///

The database username

-username=

The database user’s password

-passwd=

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

-loadfromdb=

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

-noAuth

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

-print

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.

-printerName=

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

-param=

Specify you want to print results to .PDF format

-pdf

Specify the .PDF file location and file name

-outpdf=

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

-close

You specify the -param option once for each parameter. For example:

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