Was this helpful?
Report Command Parameters
The report command of Report-Writer accepts the following parameters:
file
Equivalent to the -f flag. Directs the formatted report to the specified file for output.
silent
Equivalent to the -s flag. Suppresses status messages.
report
Equivalent to the -r flag. Indicates that a report, rather than a table, is being specified. The name of the report is the value for this parameter.
style
Equivalent to the -m flag. Indicates that a table, rather than a report, is being specified. Optional values for this parameter are column, wrap, and block. The name of the table is given as the value for the name parameter.
name
Name of a table or view in the database for which a default report is to be formatted.
param
The list of parameters for the report. Each element in the list must be of this form:
name =value
Blanks or tabs must separate Name/value combinations. The entire list must be enclosed within quotes. In addition, if name is a character report parameter, then value must be enclosed in quotes. (Values of numeric report parameters cannot, however, be quoted.) The inner quotes that surround value must then be de-referenced according to host language rules so they can be passed through to the report command.
For example, assume that you want to call the Report-Writer from within embedded SQL or OpenSQL with the equivalent of this system-level command:
report newdb -r myrpt (bin='f01'
station='u1' type=12 sect=11)
Note that bin and wstation are character parameters and that type and sect are numeric parameters.
You could call the report by placing the parameters in a program variable. For example:
exec sql call report (database = 'newdb', report = 'myrpt', param = :parmvar);
The variable, parmvar, must contain the value:
bin="f01" wstation="u1" type=12 sect=11
Double quotes must surround the constant string values within the variable. If your host language requires the de-referencing of double quotes, be sure to do so, according to the rules of your host language.
forcerep
Equivalent to the -h flag. Report-Writer can put headers and footers, even if no data is found for the report.
formfeed
Equivalent to the +b flag. Report-Writer forces formfeeds at page breaks, overriding any settings in the report formatting commands.
noformfeed
Equivalent to the -b flag. Report-Writer suppresses formfeeds, overriding any settings in the report formatting commands.
pagelength
Equivalent to the -v flag. Sets the page length, in lines, for the report, overriding any .PL commands in the report.
brkfmt
Equivalent to the +t flag (default). If set, breaks and calculations for dates and numbers are based on the displayed data, rather than the internal database values.
nobrkfmt
Equivalent to the -t flag. If set, breaks and calculations for dates and numbers are based on the internal database values, rather than the displayed values.
flags
Can be used for any flags on the command line. Flags must be separated by a blank.
Last modified date: 04/03/2024