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.
Contacts connects to the database through the ODBC connection called contacts.
Indicates that no username and password are required as is typically the case when this information is defined in the ODBC connection.
The database username.
The database user's password.
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
.
The presence of this switch simply opens the operating system's print dialogue immediately upon opening the report renderer.
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.
The presence of this switch simply closes the report renderer after the user prints or cancels printing.
When saving parameters to a report definition, the last position should contain the location and name of the OpenRPT report definition file. For example, on Windows this would look like this: c:\xTuple\Contacts-Calls-Report.xml
Below are two examples of scripts that call the report renderer, passing to it switch settings for a specified report definition.
The switches that the report renderer enables make it possible for you to store OpenRPT XML report definition files on a shared drive and script end user access to them for ad hoc reporting capability.