sreport Command--Store Report Definition in a Database
The sreport command writes a Report Writer report definition into the specified database. You can also use this command with the copyrep command to copy a report from one database to another, or from one owner to another.
The sreport command reads in a file of Report‑Writer source code formatting statements from a base text file, as well as from any files specified with an .include statement. As it reads the files, sreport performs basic syntax error checking, and, if error‑free, stores the report specification in the Reports Catalog of the database you specify.
Note: If you update the text file specified in an .include statement, you must execute the sreport command against each report specification that contains the .include statement. This procedure is required in order for the report specification to reflect the changes in the text file.
If the report specification contains syntax errors, sreport prints appropriate error messages. If a report in the text file has the same name as an existing report in the Reports Catalog, the older report definition is replaced. If no prior report exists, Report‑Writer adds the report to the Reports Catalog. You can then use the specifications to run a report using either the report command or the Go option from the RBF catalog frame.
If you use sreport to save a report created in RBF, it can strip out many of the RBF formatting statements, which makes it easier to edit the report specification in Report‑Writer. You cannot, however, edit the saved report specification in RBF.
The sreport command has the following format:
sreport dbname |vnode::dbname[/server_class] filename [-s] [-uusername]
[-Ggroupid]
dbname
Specifies the name of the database that is to contain the report, and the
vnode and
server_class, if required, as described in
Standard Flags and Parameters.
filename
Specifies the name of a text file containing report-formatting commands for one or more reports. If you do not specify a full directory path name, Report-By-Forms assumes the current directory.
Report-By-Forms prompts you for this parameter if you do not include it on the command line.
The default extension for this file is .rw.
-s
Suppresses status messages.
-uusername
-Ggroupid
Last modified date: 11/09/2022