The Esstu Pack
Index
Run Report
Uses REXXBASE (previously available from American Coders and good shareware sources) to generate a report based on a DBase database. The report file format is based largely on the original style invented by Jim Button for PC-File, but has been extended to allow REXX code in reports.
The report file should be plain text, with the following structure:
text here will be ignored - can have a brief description
:COVER
Lines to be output once at the beginning of the report
:HEADING
Lines to be output at the top of each page
:DETAIL
Lines to be output for each record selected from the database
:FOOTING
Lines to be output at the bottom of each page
:TOTAL
Lines to be output once at the end of the report
In each section lines are processed in order, top to bottom. Each line can be any one of the following:
- Literal text enclosed in double quotes " "
- Database field enclosed in angle brackets < > for spaces trimmed, or square brackets [ ] for not trimmed
- A newline marker - a slash followed by the quantity of newlines (eg /1 to go to the next line, or /2 leave a blank line as well)
- A REXX expression prefixed with a * - the result of the expression will be inserted
- A PC-File Dot command - see PC-File documentation or RunReport.CMD for details.
To use this inside a larger program, perform the following steps:
- Please contact me, especially if your program is for commercial use. RunReport.CMD is copyright, and you may not use it in a commercial program without permission.
- Copy ALL the functions from RunReport.CMD (bracketed by obvious comment lines about the "RunReport functions by Chris Angelico" - KEEP THE COMMENTS!) and include them in the code of your program
- Copy the code from the main routine of RunReport (bracketed by obvious comment lines about the "RunReport code by Chris Angelico" - again, KEEP THE COMMENTS!) into the location at which the report is to be run
- Ensure that all required variables are set correctly (DBF=DBase file name, REP=report file name, OUT=output file name, PAGELEN=lines to be put on one page), the database has been opened with REXXBASE, and the filter (if any) has been set.
- Run your program!
File: RunReport.ZIP
Requires: REXX, REXXBASE
Installation: None.
Operation: Run and follow the prompts.
De-installation: Delete.
Distribution: Donationware.