The defaults in Reporter for the attached printer and the print queue form are set in the BEGIN.ACC file with Global Storage (GS) fields. The following example provides the GS field names and the syntax to set the defaults.
USE GS ACCQR2_PRINT_OPTION IN DBL NISUTL:ACCQR2
For the print queue form:
SET 'queue_ name' TO %ACCQR2_QUEUE_NAME
SET 'form_name' TO %ACCOR2_FORM_NAME
SET ('Y'; 'N') TO %ACCQR2_PRIME_TIME
SET number of copies TO %ACCQR2_NO_COPIES
SET ('Y'; 'N') TO %ACCQR2_DELETE_FILE
For the attached printer:
SET 'printer_name' TO %ACCQR2_ATTACHED_PRINTER_NAME
When Report File option is selected, a prompt will appear for the report output file name. A message is displayed when the report is ready to be printed. The report can then be printed after exiting ACCENT R at the DCL command prompt with the commands:
*QUIT ! exit ACCENT R
$PRINT filename.REP
The report will be sent to the default printer for the terminal being used. Depending on the system configuration, varying syntax may be needed to send the report to a specified printer.
This command is an extension of the Reporter on-line report generator. Record selection criteria may be specified for a report from menu boxes. By default, the current Data Base Library (DBL) is searched for the specified report that was created with Reporter. DO REPORT then produces the report on the screen with the criteria selected. The PM (PM) associated with the reports are unaffected by the selection criteria entered.
Other considerations:
* Column headers for screen reports are in bold type for easier reading.
* An "inner join" is used in matching multiple records. This is a processing standard used by SQL tables. It primarily assumes a 1 to 1 relation between tables. The inner join differs with the traditional "outer join" used in the past with DBMACH2 which is likely to have a 1 to many relation between DS. There are two processing differences between the two types of joins:
JOIN ON MATCH
An inner join will create a "joined" (matched) record between tables (or DS) only if all the data sources with linking fields have a match in those fields. An outer join will create a "joined" record for every main data source record whether all, some, or none of the auxiliary data sources has a match in the linking fields.
NUMBER OF READS
An outer join will read records (rows) repeatedly for every combination of matches between the data sources. An inner join will read records (rows) only once for any given match between data sources.
Syntax
DO REPORT [report name] [IN DBL dbl-name] [WITH RECORD SELECTION]
Report Name
is the report name specified in Reporter when the report was created. If the name of the report is omitted, the DO REPORT command will prompt for the report name. A slash ( / ) may be used at the prompt to display a list of reports to choose from. If the report name is entered incorrectly, the command will abort.
IN DBL dbl_name
is the name of the DBL that contains the report. If the DBL name is omitted, DO REPORT will try to locate the report name in the currently declared DBL. If no DBL is declared, DO REPORT will prompt for a DBL name. A slash (/) may be used at the prompt to display a list of DBL's. If a DBL name entered does not exist, the command will abort.
WITH RECORD which SELECTION is omitted, all
allows the use of record selection criteria from menu boxes. Conditions may be specified will select the subset of records to be used for the report. If the record selection clause records will be used for the report.
DO REPORT SALES IN DBL NISDEMO:BOOKS WITH RECORD SELECTION
Running a report outside of Reporter
It is also possible to run the report at the ACCENT R prompt.
NOTE: The example report uses the logical NISDEMO which needs to be defined before the report is run. See the first tutorial step for the commands needed to define the logical.
*USE CM report_name
For the example report:
*USE CM SALES