Reportizer Documentation
Contents Index

Working with Command Line

Top Previous Next

This topic describes switches and parameters of Reportizer command line. The switches and parameters, enclosed in square brackets [], are optional, and the switches, enclosed in arrow brackets <>, are required. It is recommended to use full file names in all parameters where file names are used.

Running without switches

Switches

Examples

Running without switches

rptizer.exe  [report file]

If the command line has no any options after exe-name (options begin with "/" or "-"), then any parameters following the exe-name are interpreted as path and name of the file to open.

Example

C:\rptizer.exe  d:\data\MyTemplate.dtt

This command runs Reportizer, opens the folder, in which the .dtt file is located, and makes this report current.

Switches

rptizer.exe
  [/CloseWhenDone]  [/ReadOnly]  
  [/UserName=<database user name>]
  [/Password=<database password>]
  [/PrinterName=<printer name>]
  [/PaperSize=<paper size>]
  [/PaperSource=<paper source>]
  [/DuplexMode=<duplex mode>]
  [/p[review] | /print [/stretchprint] | /t[emplate] | /ds]
  [/copies=<number of copies>]
  [/SQLParamNames=ParamName1%#%ParamName2%#%...]
  [/SQLParamValues=ParamValue1%#%ParamValue2%#%...]
  [/SQLParamTypes=ParamType1%#%ParamType2%#%...]
  [/SQLMacroNames=MacroName1%#%MacroName2%#%...]
  [/SQLMacroValues=MacroValue1%#%MacroValue2%#%...]
  [/VarNames=VariableName1%#%VariableName2%#%...]
  [/VarValues=VariableValue1%#%VariableValue2%#%...]
  [/StaticPassword=<password for static report>]
  <report file>
[/CloseWhenDone]

Specifies, that the application is closed after successful executing of the specified operation (printing the report). This switch is used with /print switch.

[/ReadOnly]

Specifies, that the application is launched in read-only mode (reports cannot be edited).

[/UserName=<database user name>]

Specifies database user name to access the dynamic report database (if the report database is remote database that requires user name to access it). This switch is used with /print or /preview switches.

[/Password=<database password>]

Specifies database password to access the dynamic report database (if the report database is remote database that requires password to access it). This switch is used with /print or /preview switches.

[/PrinterName=<printer name>]

Specifies printer, which should print the report. This switch overrides printer settings, saved in report (if any). This switch is used with /print or /preview switches. If omitted, the printer saved in report will be used if "Report.Select Printer" property set to Yes; otherwise current or default printer will be used.

[/PaperSize=<paper size>]

Specifies printer paper size (for example, A5, A4 etc.). If omitted, report settings are used; if the corresponding report settings not specified, current printer settings are used.

[/PaperSource=<paper source>]

Specifies paper source for printer, which supports several paper sources. If omitted, report settings are used; if the corresponding report settings not specified, current printer settings are used.

[/DuplexMode=<duplex mode>]

Specifies duplex mode for printer, which supports duplex printing. Possible values are: SIMPLEX, HORZ or HORIZONTAL, VERT or VERTICAL. If omitted, report settings are used.

[/preview]

Specifies, that the report must be opened in preview mode.

[/print]

Specifies, that the report must be printed.

[/stretchprint]

Specifies, that the report must be printed in stretch print mode. If not used, then the report is printed in own printer drawing mode (default). This switch is used with /print switch.

[/template]

Specifies, that the report template must be opened in design mode (dynamic reports only).

[/ds]

Specifies, that the report template must be opened in data source editing mode (dynamic reports only).

[/copies=<number of copies>]

Specifies the number of copies to print (for example, /copies=4). If omitted, the report settings are used. This switch is used with /print switch.

[/StaticPassword=<password for static report>]

Specifies password for password protected static report.

[/SQLParamNames=ParamName1%#%ParamName2%#%...]

Can be used in cases, when report SQL text is a parameterized SQL query. SQL text of parameterized query contains parameter(s) for dynamic replacement; each parameter starts with colon, for example, :ITEMID, :PAYDATE and so on. SQL parameters are processed on database engine or database (for server databases) level. Use this switch to define a list of parameter names, which should be automatically replaced before the query execution. This list must contain parameter names (the colon must be omitted here) separated by %#% character combination. If the switch contains spaces, it should be enclosed in quotes. This switch must be used in conjunction with /SQLParamValues and /SQLParamTypes switches. See examples.

[/SQLParamValues=ParamValue1%#%ParamValue2%#%...]

List of SQL parameter values separated by %#% character combination. The number of items in the list and their positions must match the ones from /SQLParamNames switch. To pass null value, text of the value should be NULL (in upper case). If the switch contains spaces, it should be enclosed in quotes.

[/SQLParamTypes=ParamType1%#%ParamType2%#%...]

List of SQL parameter types separated by %#% character combination. The number of items in the list and their positions must match the ones from /SQLParamNames switch. Available types: Boolean, Currency, Date, DateTime, Float, Integer, SmallInt, String, Time, Word. The switch should not contain spaces.

[/SQLMacroNames=MacroName1%#%MacroName2%#%...]

Can be used in cases, when report SQL text is an SQL query with macros. SQL text of such queries contains macro(s) for dynamic replacement; each macro starts with << and ends with >>, for example, <<ITEMID>>, <<PAYDATE>> and so on; unlike parameter, macro does not have a type and is always inserted as text. Use this switch to define a list of macro names, which should be automatically replaced before the query execution. This list must contain macro names (separators << and >> must be omitted here; macro name should contain only alphanumeric characters) separated by %#% character combination. The macros are processed before processing of parameters; therefore it is possible to use macros inside parameters. If the switch contains spaces, it should be enclosed in quotes. This switch must be used in conjunction with /SQLMacroValues switch. See examples.

[/SQLMacroValues=MacroValue1%#%MacroValue2%#%...]

List of SQL macro values separated by %#% character combination. The number of items in the list and their positions must match the ones from /SQLMacroNames switch. If the switch contains spaces, it should be enclosed in quotes.

[/VarNames=VariableName1%#%VariableName2%#%...]

List of global report variables, which initial values must be overridden. Multiple items must be separated by %#% character combination. If the switch contains spaces, it should be enclosed in quotes. This switch must be used in conjunction with /Preview or /Print switches. See examples.

[/VarValues=VariableValue1%#%VariableValue2%#%...]

List of initial values of global report variables. Multiple items must be separated by %#% character combination. The number of items in the list and their positions must match the ones from /VarNames switch. If the switch contains spaces, it should be enclosed in quotes.

<report file>

Specifies full name of the report file to open. This may be dynamic report (report template) or static report. Required. If the file name contains spaces, this parameter should be enclosed in quotes.

Command line examples

rptizer.exe /preview c:\Sales.dtt
rptizer.exe c:\rep.stt
rptizer.exe /closewhendone /print /printername="HP DeskJet 895Cse" c:\Sales.dtt
rptizer.exe /p c:\Sales.dtt
rptizer.exe /ds c:\Sales.dtt
rptizer.exe /t "c:\My Data\New.dtt"
rptizer.exe /UserName=SYSDBA /Password=masterkey /print "c:\My Data\Employee.dtt"
rptizer.exe "c:\report1.dtt" /SQLParamNames=PayerNo%#%PaymentDate /SQLParamTypes=Integer%#%Date "/SQLParamValues=345%#%10/10/2006"
rptizer.exe "c:\payment.dtt" "/SQLMacroNames=PayerNumbers" "/SQLMacroValues=1025, 1037, 104"
rptizer.exe "c:\payment.dtt" "/VarNames=OBJCOUNT%#%ANCHOR" "/VarValues=0%#%Today"