External Interfaces
Report-IV allows you to integrate single or multiple reports into existing application programs, such as a Thoroughbred Script-IV program or a Thoroughbred Basic program.
Script-IV
Section titled “Script-IV”To generate report(s) from a script, refer to the script IDAUTO to view or edit the sample Report-IV external interface. The routine specified in this section illustrates how to build the values required to run a single report or multiple reports. The UTXCUSLS sample script, which generates reports, is provided.
Thoroughbred Basic
Section titled “Thoroughbred Basic”To generate report(s) from a Thoroughbred Basic program, incorporate the routine specified in this section into your existing program. This routine builds the values required to run a single report or multiple reports.
![Diagram: NOTE: Within this Thoroughbred Basic code, the comment lines [ ! ] are for explanation only.](/docs-img/openworkshop/report-iv/external-interfaces-1.webp)
0200 REM "*Build X$ For Thoroughbred REPORT-IV*"
0210 DIM X$(84) ! Required as shown
0220 LET X$(1,4) = "AUTO" ! Required as shown
0230 LET X$(5,8) = LIB-NAME + FROM-NAME ! The first 2 characters are the ! library name. Characters 3 – 8 ! are the starting report name. ! Example: "UTXRCD01"
0240 LET X$(72,6) = TO-NAME ! Characters 1–6 are the ending ! report name. ! Example: "XRCD03" ! The report definitions in the ! specified range must reside ! in the same library.
0250 LET X$(78,6) = MASK-NAME ! Characters 1–6 are the mask ! for the report name . Use valid !. mask characters or use a null !.string " " for no mask.External Interfaces
0260 LET X$(40,8) = PROGRAM-NAME ! Set PROGRAM-NAME to any !.valid program name to exit to !.after executing the report(s). !.Example: "ID"
0270 LET X$(68,2) = HARD-COPY ! Options are: ! " " - (null string) prompt user for ! standard print option ! prompts. ! "Y"- print hard copy. ! "N"- display on terminal screen. ! PN - Assign a 2-character printer ! name/ID and bypass standard ! print option prompts. !.Example: "LP"
0280 LET X$ (49,2) = " " ! These 2 bytes allow you to !.specify an Dictionary-IV predefined !.sort number for the report. You !.must have a SORT BY SORT ø !.clause in the report to use this !. feature.
0290 CALL “IRPCA0” ! Required as shown- External Interfaces
- 132
From the Report-IV Reference, version 8.9.1. Open this page in the PDF