Skip to content

CONNECT REPORT

FUNCTION

This command enables you to connect to a Report-IV report, and display or print the report during script execution.

SYNTAX

CONNECT REPORT report-name$

report-name$ the name of a report created in Report-IV.

NOTES

  • This command enables you to connect to a Report-IV report from a script and to display or print the report.
  • After the report completes, execution resumes with the following Script-IV command.
  • The report is controlled by the values specified in the REPORT$[ALL] string array. If the array does not exist, Script-IV will automatically build the array. If the array exists, Script-IV will use the values in the array to control processing.
  • The arrays used by the CONNECT QUERY and CONNECT REPORT commands have the same structure. The script compiler uses the report-name$ parameter as the report name value, which is assigned to REPORT$[1].
  • The REPORT$[ALL] string array is described below:
REPORT$[ALL] Passed to report class from a script’s CONNECT REPORT command.
[0] Return status:
“.” On output, specifies normal report completion.
[1] Report library name. This can be a two-character library name, the complete library and report name, or a comma-separated string that contains the report name and entries that correspond to the following array entries. If the complete report name is provided, no entry is placed in this array for a “From report” value in REPORT$[2].
[2] From report.
[3] To report.
[4] Mask for report range.
[5] Sort number.
[6] Report device:
null Ask hardcopy question.
“Y” Select printer prompt.
N Terminal output only.
LP|P1|P2|Pn Printer device name.
OP Use operator’s default printer.
SP Use last printer opened by operator.
CH:str-val Use channel str-val for output.
CR Reserved.
/file-name Create or overwrite output to this file. Some extraneous characters may be captured after output text.
[7] Type output:
space PRINT.
P PRINT.
W WRITE.
R WRITERECORD.
N No output.
[8] Report mode:
“ “ Normal printing.
“D” Print detail lines only. D, CTnn, STnn, and CBnn lines will print. Header and footer lines will not print.
[9] Program to execute prior to printing each report detail line. For information on how to write such a program, please refer to the Report-IV Reference Manual.
[10] Window name for a user-provided window.

EXAMPLES

CONNECT REPORT "4SXRC001"

executes the 4SXRC001 report. This report is a sample that generates a sample customer list.

DIM REPORT$[10]
LET REPORT$[1]="4S"
LET REPORT$[2]="XRCD "
LET REPORT$[3]="XRCDzz"
CONNECT REPORT

executes all reports from “4SXRCD “ through “4SXRCDzz”.

DIM REPORT$[10]
LET REPORT$[5]="4"
CONNECT REPORT "4SXRC001"

passes a sort-number to the report. This report uses the link 4SCUST. In this link, SORT4 sorts by zip code.

SEE ALSO

CONNECT HELP, CONNECT MENU, CONNECT QUERY, CONNECT SCREEN, CONNECT VIEW. For more information on reports see the Report-IV Reference Manual.

From the Script-IV Language Reference, version 8.9.1. Open this page in the PDF