RBD
RBD
Report Builder
Deployment Guide
Progress software products are copyrighted and all rights are reserved by Progress Software Corporation.
This manual is also copyrighted and all rights are reserved. This manual may not, in whole or in part, be
copied, photocopied, translated, or reduced to any electronic medium or machine-readable form without
prior consent, in writing, from Progress Software Corporation.
The information in this manual is subject to change without notice, and Progress Software Corporation
assumes no responsibility for any errors that may appear in this document.
The references in this manual to specific platforms supported are subject to change.
Progress, Progress Results, Provision and WebSpeed are registered trademarks of Progress Software
Corporation in the United States and other countries. Apptivity, AppServer, ProVision Plus, SmartObjects,
IntelliStream, and other Progress product names are trademarks of Progress Software Corporation.
SonicMQ is a trademark of Sonic Software Corporation in the United States and other countries.
Progress Software Corporation acknowledges the use of Raster Imaging Technology copyrighted by
Snowbound Software 1993-1997 and the IBM XML Parser for Java Edition.
IBM Corporation 1998-1999. All rights reserved. U.S. Government Users Restricted Rights Use,
duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Progress is a registered trademark of Progress Software Corporation and is used by IBM Corporation in the
mark Progress/400 under license. Progress/400 AND 400 are trademarks of IBM Corporation and are used
by Progress Software Corporation under license.
Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the
United States and other countries.
Any other trademarks and/or service marks contained herein are the property of their respective owners.
.
May 2001
Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Organization of This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Syntax Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Progress Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other Useful Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Development Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reporting Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4GL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DataServers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SQL-89/Open Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SQL-92 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
WebSpeed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ix
ix
ix
ix
x
xi
xiv
xvi
xvi
xvii
xviii
xix
xix
xx
xx
xxi
xxi
xxii
xxii
1.
11
12
13
13
13
14
14
15
Contents
iv
2.
21
22
24
25
27
29
210
210
213
3.
31
32
32
33
34
320
324
326
328
4.
41
42
42
44
46
46
47
47
48
415
419
419
420
422
423
424
426
Contents
5.
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
51
52
52
53
54
56
57
58
59
510
513
515
Index1
Contents
Figures
Figure 11:
Figure 21:
vi
12
211
Contents
Tables
Table 11:
Table 21:
Table 31:
Table 32:
Table 33:
Table 34:
Table 35:
Table 41:
Table 42:
Table 43:
Table 44:
Table 45:
Table 46:
Table 51:
14
212
33
313
316
318
325
44
45
46
48
49
414
55
vii
Contents
Procedures
reptlist.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
defprint.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
printlst.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
progini.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
password.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbstart1.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbfilt1.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbprint1.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbfilt2.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbplist1.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbplist2.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbstart2.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbstart3.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbfilt3.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbprint2.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbfilt4.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbbatch.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbprompt.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
rbdbconn.p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
viii
23
24
26
28
29
43
421
422
423
425
427
53
54
57
58
59
511
513
515
Preface
Purpose
This guide explains how to generate and customize Report Builder reports using the Progress
Report Engine. It explains the different interfaces to the Report Engine and how to access those
interfaces from a 4GL program or MS-Windows icon. It also provides examples of how to
incorporate reports into 4GL applications.
Audience
This guide is for 4GL programmers and developers. Some knowledge of Progress is required,
as well as a basic understanding of databases.
Typographical Conventions
This manual uses the following typographical conventions:
New terms
Monospaced typeface
indicates:
Code examples
System output
Small capitals are used for Progress key functions and generic keyboard keys.
END-ERROR, GET, GO
ALT, CTRL, SPACEBAR, TAB
Preface
When you have to press a combination of keys, they are joined by a dash. You press and
hold down the first key, then press the second key.
CTRL-X
When you have to press and release one key, then press another key, the key names are
separated with a space.
ESCAPE H
ESCAPE CURSOR-LEFT
Syntax Notation
The syntax for each component follows a set of conventions:
Uppercase words are keywords. Although they are always shown in uppercase, you can
use either uppercase or lowercase when using them in a procedure.
In this example, ACCUM is a keyword:
SYNTAX
ACCUM aggregate expression
Italics identify options or arguments that you must supply. These options can be defined
as part of the syntax or in a separate syntax identified by the name in italics. In the
ACCUM function above, the aggregate and expression options are defined with the
syntax for the ACCUM function in the Progress Language Reference.
You must end all statements (except for DO, FOR, FUNCTION, PROCEDURE, and
REPEAT) with a period. DO, FOR, FUNCTION, PROCEDURE, and REPEAT
statements can end with either a period or a colon, as in this example:
xi
Square brackets ([ ] ) around an item indicate that the item, or a choice of one of the
enclosed items, is optional.
In this example, STREAM stream, UNLESS-HIDDEN, and NO-ERROR are optional:
SYNTAX
DISPLAY
STREAM stream
][
UNLESS-HIDDEN
][
NO-ERROR
In some instances, square brackets are not a syntax notation, but part of the language.
For example, this syntax for the INITIAL option uses brackets to bound an initial value
list for an array variable definition. In these cases, normal text brackets ( [ ] ) are used:
SYNTAX
INITIAL [ constant
, constant
] ...
Braces ({ }) around an item indicate that the item, or a choice of one of the enclosed
items, is required.
In this example, you must specify the items BY and expression and can optionally specify
the item DESCENDING, in that order:
SYNTAX
BY expression
DESCENDING
]}
In some cases, braces are not a syntax notation, but part of the language.
For example, a called external procedure must use braces when referencing arguments
passed by a calling procedure. In these cases, normal text braces ( { } ) are used:
SYNTAX
{ &argument-name }
xii
Preface
EACH
FIRST
LAST
record-phrase
logical-name
alias
Ellipses (...) indicate that you can choose one or more of the preceding items. If a group
of items is enclosed in braces and followed by ellipses, you must choose one or more of
those items. If a group of items is enclosed in brackets and followed by ellipses, you can
optionally choose one or more of those items.
In this example, you must include two expressions, but you can optionally include more.
Note that each subsequent expression must be preceded by a comma:
SYNTAX
MAXIMUM ( expression , expression
, expression
] ...
In this example, you must specify MESSAGE, then at least one of expression or SKIP, but
any additional number of expression or SKIP is allowed:
SYNTAX
MESSAGE
expression
SKIP
(n)
] } ...
In this example, you must specify {include-file, then optionally any number of argument
or &argument-name = "argument-value", and then terminate with }:
SYNTAX
{ include-file
argument
&argument-name = "argument-value"
] ...
xiii
In some examples, the syntax is too long to place in one horizontal row. In such cases,
optional items appear individually bracketed in multiple rows in order, left-to-right and
top-to-bottom. This order generally applies, unless otherwise specified. Required items
also appear on multiple rows in the required order, left-to-right and top-to-bottom. In cases
where grouping and order might otherwise be ambiguous, braced (required) or bracketed
(optional) groups clarify the groupings.
In this example, WITH is followed by several optional items:
SYNTAX
WITH
[
[
ACCUM max-length
][
STREAM-IO ]
CENTERED
] [ expression DOWN ]
] [ SIDE-LABELS ]
n COLUMNS
In this example, ASSIGN requires one of two choices: either one or more of field, or one
of record. Other options available with either field or record are grouped with braces and
brackets. The open and close braces indicate the required order of options:
SYNTAX
ASSIGN
{[
FRAME frame ]
{ field [ = expression ] }
[ WHEN expression ]
} ...
| { record [ EXCEPT field ... ] }
}
Progress Messages
Progress displays several types of messages to inform you of routine and unusual occurrences:
xiv
Compile messages inform you of errors found while Progress is reading and analyzing a
procedure prior to running it (for example, if a procedure references a table name that is
not defined in the database).
Preface
Startup messages inform you of unusual conditions detected while Progress is getting
ready to execute (for example, if you entered an invalid startup parameter).
Continues execution, subject to the error-processing actions that you specify, or that are
assumed, as part of the procedure. This is the most common action taken following
execution messages.
Returns to the Progress Procedure Editor so that you can correct an error in a procedure.
This is the usual action taken following compiler messages.
Halts processing of a procedure and returns immediately to the Procedure Editor. This
does not happen often.
Progress messages end with a message number in parentheses. In this example, the message
number is 200:
** Unknown table name table. (200)
Use Progress online help to get more information about Progress messages. Many Progress
tools include the following Help menu options to provide information about messages:
Choose Help Recent Messages to display detailed descriptions of the most recent
Progress message and all other messages returned in the current session.
Choose Help Messages, then enter the message number to display a description of any
Progress message. (If you encounter an error that terminates Progress, make a note of the
message number before restarting.)
xv
Preface
Progress Master Index and Glossary for Windows and Progress Master Index and Glossary for
Character (Hard copy only)
Platform-specific master indexes and glossaries for the Progress hard-copy documentation
set.
Progress Startup Command and Parameter Reference
A reference manual that describes the Progress startup commands and parameters in
alphabetical order.
Welcome to Progress (Hard copy only)
A booklet that explains how Progress software and media are packaged. An icon-based
map groups the documentation by functionality, providing an overall view of the
documentation set. Welcome to Progress also provides descriptions of the various services
Progress Software Corporation offers.
Development Tools
Progress ADM 2 Guide
A guide to using the Application Development Model, Version 2 (ADM 2) application
architecture to develop Progress applications. It includes instructions for building and
using Progress SmartObjects.
Progress ADM 2 Reference
A reference for the Application Development Model, Version 2 (ADM 2) application. It
includes descriptions of ADM 2 functions and procedures.
Progress AppBuilder Developers Guide (Windows only)
A programmers guide to using the Progress AppBuilder visual layout editor. AppBuilder
is a Rapid Application Development (RAD) tool that can significantly reduce the time and
effort required to create Progress applications.
Progress Basic Database Tools (Character only; information for Windows is in online help)
A guide for the Progress Database Administration tools, such as the Data Dictionary.
Progress Basic Development Tools (Character only; information for Windows is in online help)
A guide for the Progress development toolset, including the Progress Procedure Editor and
the Application Compiler.
xvii
xviii
Preface
4GL
Building Distributed Applications Using the Progress AppServer
A guide that provides comprehensive information about building and implementing
distributed applications using the Progress AppServer. Topics include basic product
information and terminology, design options and issues, setup and maintenance
considerations, 4GL programming details, and remote debugging.
Progress External Program Interfaces
A guide to accessing non-Progress applications from Progress. This guide describes how
to use system clipboards, UNIX named pipes, Windows dynamic link libraries, Windows
dynamic data exchange, Windows ActiveX controls, and the Progress Host Language Call
Interface to communicate with non-Progress applications and extend Progress
functionality.
Progress Internationalization Guide
A guide to developing Progress applications for markets worldwide. The guide covers
both internationalizationwriting an application so that it adapts readily to different
locales (languages, cultures, or regions)and localizationadapting an application to
different locales.
Progress Language Reference
A three-volume reference set that contains extensive descriptions and examples for each
statement, phrase, function, operator, widget, attribute, method, and event in the Progress
language.
Progress Programming Handbook
A two-volume handbook that details advanced Progress programming techniques.
Database
Progress Database Design Guide
A guide that uses a sample database and the Progress Data Dictionary to illustrate the
fundamental principles of relational database design. Topics include relationships,
normalization, indexing, and database triggers.
Progress Database Administration Guide and Reference
This guide describes Progress database administration concepts and procedures. The
procedures allow you to create and maintain your Progress databases and manage their
performance.
xix
SQL-89/Open Access
Progress Embedded SQL-89 Guide and Reference
A guide to Progress Embedded SQL-89 for C, including step-by-step instructions on
building ESQL-89 applications and reference information on all Embedded SQL-89
Preprocessor statements and supporting function calls. This guide also describes the
relationship between ESQL-89 and the ANSI standards upon which it is based.
Progress Open Client Developers Guide
A guide that describes how to write and deploy Java and ActiveX applications that run as
clients of the Progress AppServer. The guide includes information about how to expose
the AppServer as a set of Java classes or as an ActiveX server.
Progress SQL-89 Guide and Reference
A user guide and reference for programmers who use interactive Progress/SQL-89. It
includes information on all supported SQL-89 statements, SQL-89 Data Manipulation
Language components, SQL-89 Data Definition Language components, and supported
Progress functions.
xx
Preface
SQL-92
Progress Embedded SQL-92 Guide and Reference
A guide to Progress Embedded SQL-92 for C, including step-by-step instructions for
building ESQL-92 applications and reference information about all Embedded SQL-92
Preprocessor statements and supporting function calls. This guide also describes the
relationship between ESQL-92 and the ANSI standards upon which it is based.
Progress JDBC Driver Guide
A guide to the Java Database Connectivity (JDBC) interface and the Progress SQL-92
JDBC driver. It describes how to set up and use the driver and details the drivers support
for the JDBC interface.
Progress ODBC Driver Guide
A guide to the ODBC interface and the Progress SQL-92 ODBC driver. It describes how
to set up and use the driver and details the drivers support for the ODBC interface.
Progress SQL-92 Guide and Reference
A user guide and reference for programmers who use Progress SQL-92. It includes
information on all supported SQL-92 statements, SQL-92 Data Manipulation Language
components, SQL-92 Data Definition Language components, and Progress functions. The
guide describes how to use the Progress SQL-92 Java classes and how to create and use
Java stored procedures and triggers.
Deployment
Progress Client Deployment Guide
A guide that describes the client deployment process and application administration
concepts and procedures.
Progress Developers Toolkit
A guide to using the Developers Toolkit. This guide describes the advantages and
disadvantages of different strategies for deploying Progress applications and explains how
you can use the Toolkit to deploy applications with your selected strategy.
Progress Portability Guide
A guide that explains how to use the Progress toolset to build applications that are portable
across all supported operating systems, user interfaces, and databases, following the
Progress programming model.
xxi
xxii
1
Report Engine Basics
Report Engine allows you to run reports created by Report Builder from Progress 4GL
applications. This chapter describes:
1.1
Report Engine
Database
Figure 11:
Report
Definition
RE
Parameters
Report
Although you can generate reports with either Report Builder or Report Engine, there are two
important reasons you might use Report Engine instead of Report Builder:
12
To create a report with Report Builder, you must be running Report Builder. However, you
can run previously defined reports with Report Engine without access to Report Builder.
This allows users who do not have access to Report Builder to run reports.
You can generate reports by invoking Report Engine from a 4GL application. This means
that you can write applications to run batches of reports, run reports at specific times, or
allow users to change reports and specify report overrides using an interface that you can
design within an application.
1.2
Table interface
PRINTRB interface
PRNTRB2 interface
The following sections provide a brief overview of the three Report Engine interfaces. See
Chapter 4, Report Engine Table Interface, and Chapter 5, Report Engine PRINTRB and
PRNTRB2 Interfaces, for complete descriptions of each interface.
1.2.1
Table Interface
To use the table interface, you create a database record that specifies values for all the report
parameters, and then Report Engine reads the record to obtain the parameter values. You can
also create more than one database recordone for each report and Report Engine will run
all the reports. When you use the Report Engine table interface, you can run it either from a 4GL
application or from an MS-Windows icon using the standard Progress client command line
parameters.
You must use the table interface for full access to Version 8 or greater Report Builder
functionality.
1.2.2
PRINTRB Interface
The PRINTRB interface allows you to specify nineteen report parameters in an application. You
can run it only from a 4GL application, which means that you must be in a Progress session to
run the Report Engine PRINTRB interface. The PRINTRB interface does not support some of
the Version 8 or greater Report Builder functionality.
13
1.2.3
PRNTRB2 Interface
The PRNTRB2 interface allows you to specify twenty report parameters in an application. You
can run it only from a 4GL application, which means that you must be in a Progress session to
run the Report Engine PRNTRB2 interface. PRNTRB2 allows you to run multiple instances of
Report Engine simultaneously in the same directory. The PRNTRB2 interface does not support
some of the Version 8 or greater Report Builder functionality.
1.2.4
Table 11 lists the issues you must consider when deciding which interface to use.
Table 11:
PRINTRB
Interface
PRNTRB2
Interface
Issue
14
1.3
To have access to all the fonts and formatting specified in the report definitions that you
intend to use, verify that you have an MS-Windows printer driver installed. (The physical
printer does not have to be installed if you are only previewing reports on the screen or
printing them to files). If you do not have a printer driver installed, Report Engine will not
have access to the font information that it requires to generate reports.
Report Engine must be installed on the machine where you are running it.
The report libraries containing the reports you have designed using Report Builder must
be on the machine where you are running Report Engine.
The databases you designed your reports for must be accessible by Report Engine.
If your reports use any user-defined functions, the PRORB.UDF file in which the UDF
definitions are stored must be on the machine where you are running Report Engine.
Any memo files attached to your reports must be on the machine where you are running
Report Engine.
Create a table in which to place the report parameters, in a new or existing database. This
table is the Report Engine table and the database that contains it is the Report Engine
database. The table must have fields for each of the eighteen required parameters. See
Chapter 4, Report Engine Table Interface, for more information about creating this
database. Progress supplies a data definition file that contains a sample table. The Report
Engine record must be created in an actual database; it cannot be created in a temporary
table or a work file.
Create one or more records containing values for the report parameters.
Once you have performed these tasks, you can invoke Report Engine from the 4GL or create an
icon that invokes Report Engine using the Report Engine table.
15
16
2
Report Engine Administration
This chapter describes Report Engine administration tasks, including:
2.1
The following list describes the arguments for the _getname.p procedure:
library-pathname
The character variable that will display the report names as a comma separated list.
report-count
The integer variable that will receive the number of reports in the library.
22
SKIP
/* 3 */
RUN aderb/_getname.p ("c:\acctslib.prl", OUTPUT report-list,
OUTPUT report-count).
report = ?.
report:list-items = report-list.
DISPLAY report-count WITH FRAME x.
UPDATE report WITH FRAME x.
Define the variables that will display the report names and the number of reports.
2.
3.
Call the _getname.p procedure and specify first the report library, second, the variable in
which to return the report names, and lastly, the variable in which to return the number of
reports in the library.
23
2.2
The following list describes the arguments for the _prdef.p procedure:
printer-name
The character variable that will receive the name of the printer.
port-name
The character variable that will receive the name of the port.
success
The logical variable that gets assigned a TRUE value (yes) if Progress returns a string of
zero or more characters and a FALSE value if no string is returned.
For example, run the defprint.p procedure:
defprint.p
/* 1 */
DEF VAR printer AS CHARACTER FORMAT "x(45)".
DEF VAR port AS CHARACTER FORMAT "x(20)".
DEF VAR success AS LOGICAL.
/* 2 */
RUN aderb/_prdef.p (OUTPUT printer, OUTPUT port, OUTPUT success).
/* 3 */
IF success THEN DO:
DISPLAY printer port.
PAUSE.
END
ELSE MESSAGE "_prdef failed" VIEW-AS ALERT-BOX ERROR.
24
2.3
1.
Define the variables that will display the printer name and port name. Also define a logical
variable that will test whether the printer information is available. If the procedure returns
a string, _prdef.p sets the variable to True; if no string is returned, _prdef.p sets the
variable to False.
2.
Call the _prdef.p procedure and specify the printer, port, and logical variables.
3.
Test the value in the success variable, then display the appropriate information.
The following list describes the arguments for the _prlist.p procedure:
printer-list
The character variable that will receive the printer names as a comma-separated list.
port-list
The character variable that will receive the port names as a comma-separated list.
printer-count
25
/* 2 */
RUN aderb/_prlist.p (OUTPUT printer-list, OUTPUT port-list,
OUTPUT printer-count).
/* 3 */
REPEAT i = 1 TO printer-count:
printer = entry (i, printer-list).
port = entry (i, port-list).
DISPLAY i ")" printer port.
END.
PAUSE.
26
1.
Define the variables that will display the printer and port names and the number of
printers.
2.
Call the _prlist.p procedure and specify the printer, port, and printer count variables.
3.
2.4
The following list describes the arguments for the _getini.p procedure:
section-name
The name of the section in the initialization file. In the Report Engine status file, this is
also the name of the report being run.
entry-name
The name of the entry that you want. For example, RO-ERROR-CODE or
RO-ERROR-MESSAGE in the report status file.
entry-default
The default value to be used if the entry is not found in the specified section.
entry-value
The character variable that will display the value of the specified entry.
ini-pathname
The full pathname to the initialization file being used. For example, with the Report
Engine table interface, this is the file specified by the Report Status File (-rbstatfile)
parameter.
success
The logical variable that gets assigned a TRUE value (yes) if Progress returns a string of
zero of more characters and a FALSE value if no string is returned. Currently, this
parameter always gets assigned a TRUE value (yes). The parameter is included to allow
for future enhancements.
27
28
1.
Define the variables that will pass the character value and logical value for the _getini.p
procedure.
2.
Call aderb/_getini.p and specify all six arguments, including the variables to pass the
result and return values.
3.
Test the value in the success variable, then display the appropriate information.
4.
Currently, the ELSE code will never be executed. The test shown will never
failsuccess always has the value true. This is an artifact of how the underlying
MS-Windows function behaves.
2.5
CAUTION: Although _rbpwenc encodes users passwords making it more difficult for a user
to obtain the password required to connect to a database, other users can still copy
the encoded password and use it to generate their own reports. Progress Software
provides _rbpwenc to make your password more secure, but it does not guarantee
that _rbpwenc is unbreakable.
29
2.6
Report Engine writes status and error messages to one or both of these places depending on
which interface and command-line parameters you use.
2.6.1
The first location where Report Engine outputs status information is a text file called the report
status file. The files name and location depend upon which interface you use.
If you use the PRINTRB interface, Report Engine automatically writes report status information
to the report status file, called RBRUN.OUT in the current directory.
If you use the PRNTRB2 interface, you must set the RB-STATUS-FILE parameter. The report
status file is created and has the same format as the RBRUN.OUT file. If you do not indicate the
filename, this file is not generated. The file is written to either the directory specified in the
RB-STATUS-FILE or the current directory if none is specified. See Chapter 5, Report Engine
PRINTRB and PRNTRB2 Interfaces, for a complete description of the Report Status File
parameter.
However, if you use the table interface, you can choose whether to have Report Engine create
a report status file, using the Report Status File (-rbstatfile) parameter. This parameter specifies
the file name and directory of the report status file. See Chapter 4, Report Engine Table
Interface, for a complete description of the Report Status File parameter.
After running Report Engine, you can check the status file for information about Report Engine
processing. If Report Engine encountered an error, the file contains an error message that
explains why a report was terminated, as well as an error code that lets you determine the type
of error. The status file also contains the number of pages printed, so a report can be restarted
where it left off.
If you set the RB-DISPLAY-ERRORS parameter to true, Report Engine also displays error
messages on the screen as it executes. For a complete description of the
RB-DISPLAY-ERRORS parameter, see Chapter 3, Report Engine Parameters,
To avoid confusing old and new status files, delete any existing status files before starting
Report Engine.
210
[Order Report]
RO-ERROR-CODE=J
RO-ERROR-MESSAGE=Invalid report library
Ro-PAGES=0
Figure 21:
RO-ERROR-CODE
RO-ERROR-MESSAGE
RO-PAGES
211
Entry
Meaning
An error occurred while attempting to process the report. See the message in
the RO-ERROR-MESSAGE entry.
RO-ERROR-MESSAGE
The error message value depends upon the type of error. The following table lists what type of
message appears for different errors:
If the error message
is . . .
212
Then . . .
Blank
Report cancelled
Other
2.6.2
RB-STATUS Field
The second location where Report Engine outputs status information is the RB-STATUS field
in the Report Engine table. However, Report Engine writes report status and error messages to
the RB-STATUS field only if you specify the Report Update Status (-rbupds) parameter. See
Chapter 4, Report Engine Table Interface, for more information about the RB-STATUS field.
213
214
3
Report Engine Parameters
This chapter describes how to use the Report Engine parameters to generate reports.
Specifically, it describes:
Parameter basics
Predefined parameters
User-defined parameters
3.1
Parameter Basics
When you run a report with Report Engine, you can provide or override many of the report
characteristics using report parameters. These parameters identify the report library that
contains the report to be run and the report name, and optionally override some of the report
characteristics stored in the report definition. There is also an output parameter that can be used
with the table interface to provide report status information.
There are two types of parameters:
Predefined
User-defined
The following sections describe how to use both types of parameters. Because Report Engine
has three different interfaces, take note of the interface-specific information. See Chapter 4,
Report Engine Table Interface, and Chapter 5, Report Engine PRINTRB and PRNTRB2
Interfaces, for information about the different interfaces.
3.2
Predefined Parameters
Predefined parameters are parameters defined by Report Engine to identify the report you want
to run and to control frequently changed report features, such as filters and print information,
allowing you to customize your reports. There is also an output parameter that provides status
information.
Report Engine provides predefined parameters to control report processing. Depending on the
interface you use, you specify parameters as arguments to a procedure or as values stored in a
database table. See Chapter 4, Report Engine Table Interface, or Chapter 5, Report Engine
PRINTRB and PRNTRB2 Interfaces, for more information about using the parameters with
each interface.
32
3.2.1
Table 31 lists the predefined Report Engine parameters. Each parameter name has the prefix
RB-, indicating that it is a Report Builder parameter. In the Data Type column, the letter C
represents the CHARACTER data type, I represents INTEGER, and L represents LOGICAL.
Parameters that require character values can contain uppercase, lowercase, or mixed-case
letters.
Table 31:
Parameter Name
(1 of 2)
Data
Type
Contents
Interface
RB-REPORT-LIBRARY
All
RB-REPORT-NAME
Report name
All
RB-DB-CONNECTION
Database connection
override string
All
RB-INCLUDE-RECORDS
Filter flag
All
RB-FILTER
Filter expression
All
RB-MEMO-FILE
Memo filename
All
RB-PRINT-DESTINATION
Print destination
All
RB-PRINTER-NAME
Printer name
All
RB-PRINTER-PORT
Printer port
All
RB-OUTPUT-FILE
Output filename
All
RB-NUMBER-COPIES
Number of copies
All
RB-BEGIN-PAGE
All
RB-END-PAGE
All
RB-TEST-PATTERN
All
RB-WINDOW-TITLE
Window title
All
RB-DISPLAY-ERRORS
All
33
Parameter Name
(2 of 2)
Data
Type
Contents
Interface
RB-DISPLAY-STATUS
All
RB-NO-WAIT
Synchronous or
asynchronous processing
PRINTRB
RB-OTHER-PARAMETERS
User-defined parameters
All
RB-TAG
Which reports to
generate
Table
RB-STATUS
Status of a report
Table
RB-STATUS-FILE
PRNTRB2
PRNTRB2
For the PRINTRB and PRNTRB2 interfaces, you must enter the parameter values in the order
in which the parameters appear in Table 31. However, for the table interface, the parameters
are represented by fields in a table and can be assigned values in any order. Regardless of which
interface you use, you must specify values for the RB-REPORT-LIBRARY and
RB-REPORT-NAME parameters.
3.2.2
This section describes each of the predefined Report Engine parameters in alphabetical order.
RB-BEGIN-PAGE
Specifies the starting page number for the report. The value you specify for
RB-BEGIN-PAGE must be less than or equal to the reports ending page, which can be
saved in the report definition or specified by RB-END-PAGE. The default value of
RB-BEGIN-PAGE is 0, which means to use the beginning page saved in the report
definition. The default beginning page value saved in a report definition is 1.
For example, A user can restart a cancelled report where it was interrupted by specifying
the starting page number as the RB-BEGIN-PAGE value and 999999999 as the
RB-END-PAGE value.
To reprint one or more consecutive pages of a report, specify the page numbers in the
RB-BEGIN-PAGE and RB-END-PAGE parameters. To print just one page, specify the
same page number for both parameters.
34
Allows you to override the saved database connections by specifying the logical name of
the database as saved in the report and all connection parameters Report Engine needs to
connect to the database containing the report data. You can specify a string composed of
any valid Progress 4GL connection parameters.
Report Builder saves all required database connection information with the report
definition (except the password). You need to specify a value for RB-DB-CONNECTION
only in three situations:
If you want to run a report using a database other than the one saved with the report
definition
If you want to run a report using the same database that is saved with the report
definition, but you are connecting to that database on the command line that invokes
Report Engine (or in a .pf file that Report Engine reads on startup)
If your database requires a password, and you do not want Report Engine to prompt
you for it
Use the logical database name, not the physical database name, when specifying which
report databases are to be overridden with the RB-DB-CONNECTION parameter.
If you have security measures such as passwords and user IDs enabled, you must specify
the Password (-P) and User ID (-U) parameters or the Report Password (-rbP) parameter
if you are using the table interface.
RB-DB-CONNECTION and the Report Engine Table Interface
When you use the Report Engine table interface, you can use RB-DB-CONNECTION in two
ways:
Specify all the database connection information. To do this, simply specify the database
connection information using the Progress 4GL connection parameters.
Specify to use a database to which Report Engine was connected by the command line. To
do this, you must specify a complete database connection for the report on the command
line or in the rbstart.pf file, then specify the RB-DB CONNECTION values. See Chapter
4, Report Engine Table Interface, for information about using and invoking the table
interface, including using the rbstart.pf file.
35
On the left side of both symbols (=> and =), specify the logical name of a database saved
with the report.
On the right side of the => symbol, specify the logical name of a database that was
connected on the command line.
To override a connection to a Progress Atlas database saved in the report definition with a
connection to a non-Progress database, you must specify two connections. The first connection
is to the Progress schema holder and the second is to the non-Progress database. Because you
must use two connections, you cannot simply use the = symbol in the
RB-DB-CONNECTION parameter. Instead, you must connect to the schema holder and
non-Progress database on the command line and then use the => symbol in the
RB-DB-CONNECTION parameter to override the database used in the report with the
non-Progress database. This can only be done with the table interface.
NOTE:
If you put the Report Engine table into the same database as your application data,
and if you create a report that refers to that database, you must use the
RB-DB-CONNECTION parameter with the => symbol. If you do not, Report
Engine might indicate that the database is already connected when it tries to run the
report.
The problem is that because the Report Engine table information is in the database, you must
specify the database connection information on the command line that invokes Report Engine
(or in a .pf file that Report Engine reads on startup). This means that Report Engine will already
be connected to the database by the time it starts working on the report; when it tries to connect
to the database requested in the report, it will be attempting to connect to the same database a
second time.
36
Note that logical1 is the logical name of the database as stored in the report and logical2 is the
logical name used for the same database in the connection parameters on the command line. In
this situation, where the Report Engine database is the same as the application database, these
two logical names are often the same.
The following example shows how to override the stored connection information. If the report
definition specifies the physical database as newdb1.db and the logical database name as
newdb1, you override the saved database with a connection established on the command line
with the following steps:
1 Override the saved database connection information using the following value in the
RB-DB-CONNECTION parameter:
The => symbol indicates to use a database already connected on the command line. This
parameter value means that when Report Engine runs the report, it uses the connection
established on the command line and does not attempt to make a connection to the newdb1
database.
This command invokes Report Engine with a connection to the newdb2 database. In this
example, the newdb2 database contains both the tables required by the report and the table
(Rep-Eng) that specifies the RB-DB-CONNECTION parameter value.
37
The = symbol indicates to establish a new database connection using the specified
connection information and ignore the databases connected on the command line. This
value means that when you invoke Report Engine, it will override the stored database
connection information for newdb1 with the information -db newdb3 -1".
You can override the database connection information for multiple databases using the
RB-DB-CONNECTION parameter. To override multiple databases in the same
RB-DB-CONNECTION parameter value, separate each section with a new-line character
(~n) as shown in the following example:
This example overrides the connection information for three report databases (with logical
names sample, demo, and sports). Notice that each database override is separated by a
new-line character (~n). When entering data into a Progress fill-in field, you must use
CHR(10) to identify the new-line character.
When you are overriding database connection information for a report that uses multiple
databases, you do not have to provide override information for all the databases; only the
ones that you want to override.
There are several reasons to use the table interface with RB-DB-CONNECTION:
38
If all the reports are run against the same database, you can connect to it on the
command line, and then Report Engine maintains that one database connection for
all reports instead of re-establishing the connection as it runs each report.
On the left side of the = symbol, specify the logical name of the database saved with the
report.
39
This value means that when you invoke Report Engine, it will override all the stored database
connection information for newdb1 with the information -db newdb3 -1". The = symbol
indicates to establish a new database connection using the specified connection information.
For backward compatibility, you can still use the syntax required by earlier versions of Report
Builder to override individual parameters. For example, the following value tells Report Engine
to simply add the values to the existing connection information stored in the report:
-db newdb3 -S newserver
RB-DISPLAY-ERRORS
Controls whether Report Engine displays an error message dialog box when it encounters
an error.
If the parameter is false and you are using the PRINTRB and/or PRNTRB2 interfaces,
Report Engine does not display the error messages, but writes them to the report status file
in the current working directory. However, if you are using the table interface, Report
Engine writes to the report status file only if you use the Report Status File (-rbstatfile)
parameter. The report status file is a text file to which Report Engine writes status and
error information. For information about the status file, see the Verifying Report Status
section of Chapter 2, Report Engine Administration.
If the parameter is true, Report Engine displays the error message on the screen in addition
to possibly writing it to the report status file. When Report Engine displays the error
message dialog box, the user must choose OK to acknowledge the error. Report Engine
then either terminates processing of that report or displays a dialog box where the user can
enter the correct information.
310
Controls whether Report Engine displays a Print Status window while it generates a report.
If the parameter is false, Report Engine does not display a Status window, but displays as
an icon while it is running.
If the parameter is true, Report Engine displays a Status window.
RB-END-PAGE
Specifies the ending page number for the report. The default value for this parameter is 0,
which means to use the ending page saved in the report definition. The default ending page
saved in the report definition is 999999999. The value you specify for RB-END-PAGE
must be greater than or equal to the reports beginning page, which can be either saved in
the report definition or specified using RB-BEGIN-PAGE.
For example, to print only the first ten pages of a long report, specify RB-BEGIN-PAGE
as 1 and RB-END-PAGE as 10.
To reprint one or more consecutive pages of a report, specify the page numbers in the
RB-BEGIN-PAGE and RB-END-PAGE parameters. To print just one page, specify the
same page number for both parameters.
RB-FILTER
Specifies a logical expression to override the filter saved in the report definition, if any,
when RB-INCLUDE-RECORDS is set to override ("O").
The syntax of the RB-FILTER expression is identical to that of any calculated field
expression that returns a logical value. The RB-FILTER expression can be up to 1024
characters long. When an expression is specified, Report Engine selects all records where
the value of the RB-FILTER expression is true. The expression can reference any data,
aggregate fields, or calculated fields that are available in the report. See the Progress
Report Builder Users Guide for the restrictions on filtering with aggregate and calculated
fields.
If the expression you enter is not server-evaluatable, the report might run significantly
slower. See the Progress Report Builder Users Guide for more information about
server-evaluatable expressions.
311
You must enclose literal strings in quotation marks and use the tilde-quote (~"string~") or
quote-quote (""string"") around the embedded character strings.
Entering Balance >= 200 selects all records where the value in the Balance field is greater
than or equal to 200. To select records where the date in the Order-Date field of the Order
table is January 31, 1994, use this format:
"Order.Order-Date = 01/31/94"
If the same field name exists in more than one table used in your report, you must specify
the table alias and the field name as shown in the previous example.
You can enter compound filter expressions by using parentheses. For example, the
following filter expression selects all records where the value in the City field is either
Dallas or Houston and where the value in the Credit-Limit field is greater than 50,000:
See the Progress Report Builder Users Guide for information about the order in which
Report Builder evaluates expressions.
NOTE: You must set RB-INCLUDE-RECORDS to override ("O") for the RB-FILTER
to override the filter in the report definition.
312
Controls whether to apply a filter to the report at run time. Table 32 lists the valid
RB-INCLUDE-RECORDS values.
Table 32:
Value
RB-INCLUDE-RECORDS Values
Meaning
(Saved) runs the report using the filter saved in the report definition, if
any. Report Engine ignores the expression in RB-FILTER and runs the
report as specified in the report definition.
(Entire) runs the entire report, ignoring any filter specified in the report
definition or in the RB-FILTER parameter.
(Override) overrides the filter specified in the report definition with the
expression in the RB-FILTER parameter.
(Question mark) displays a dialog box allowing the user to enter a filter
expression or edit the filter specified in the report definition.
blank
Runs the report using the filter saved in the report definition, if any.
Report Engine ignores the expression in RB-FILTER and runs the report
as specified in the report definition.
When you use the question mark (?) value for the RB-INCLUDE-RECORDS parameter,
Report Engine ignores the value of RB-FILTER.
313
Contains the name and optional directory location of a memo file to be used in place of the
one saved in the report definition. The override memo file must be on the machine where
Report Engine is running. Report Engine searches for the memo file in the following ways:
If you specify a . . .
If you leave this parameter blank, Report Engine uses the memo file specified in the report
definition.
RB-NO-WAIT
Specifies whether to use synchronous or asynchronous processing when you are using the
PRINTRB or PRNTRB2 interfaces. If this parameter is No, then aderb/_printrb.p
does not return until Report Engine finishes printing the report. If it is Yes, then
aderb/_printrb.p returns as soon as Report Engine starts, allowing the 4GL program to
continue with other tasks while the report prints.
RB-NO-WAIT is required only with the PRINTRB and PRNTRB2 interfaces. In order to
run multiple instances of Report Engine with PRNTRB2, RB-NO-WAIT must be set to
Yes. You cannot use this parameter if you are using the table interface. Instead, you
specify this functionality as an argument to _prore.p. See Chapter 4, Report Engine
Table Interface, for more information.
RB-NUMBER-COPIES
Specifies the number of copies of the report you want to print. The number must be
between 0 and 999, inclusive. If you enter 0, Report Engine prints the number of copies
specified in the report definition. If you specify a number, the specified value overrides the
number entered in the Report Builder Print Setup dialog box.
314
Saves report output as a file for printing later, or use it in conjunction with
RB-PRINT-DESTINATION to export a report to a text file without printer control codes.
The name of the output file can include a path. The override output file must be on the
machine where Report Engine is running.
For example, to send a report to a text file Order.txt in the c:\projects\text
subdirectory, specify the following value for the RB-OUTPUT-FILE parameter, and
RB-PRINT-DESTINATION as A:
c:\projects\text\Order.txt
If RB-OUTPUT-FILE does not include a path, Report Engine places the file in the current
working directory.
When you specify this parameter, and if RB-PRINT-DESTINATION contains the value
A, the report outputs as a text file. If the value of RB-PRINT-DESTINATION is anything
other than A, Report Engine outputs the report to a file with printer control codes.
If RB-OUTPUT-FILE does not include a path, Report Engine places the file in the current
working directory.
RB-PRINT-DESTINATION
Specifies to print the report on the printer specified in the report definition or with the
RB-PRINTER-NAME parameter or to display the report on the screen. Leave the
parameter blank to print to the printer saved in the report definition or to the printer
specified as the RB-PRINTER-NAME value. Table 33 describes the valid
RB-PRINT-DESTINATION values.
315
Table 33:
Value
RB-PRINT-DESTINATION Values
Meaning
Displays the report on the screen. This allows the user to preview the
report before printing it. After previewing the report, the user can choose
Print on the Preview screen to send the report to the printer specified in
the report definition or specified as the RB-PRINTER-NAME value. If
the value of RB-PRINT-DESTINATION is D and you specify
RB-OUTPUT-FILE, when the user chooses Print in Preview, Report
Engine outputs the report to the file specified in RB-OUTPUT-FILE,
using control codes for the printer specified with RB-PRINTER-NAME.
Sends the report to the text file named as the RB-OUTPUT-FILE value.
Report Engine exports the report as a text file without printer control
codes.
Allows the user to select the print destination (screen or printer) at run
time. When the value of RB-PRINTER-NAME is a question mark,
Report Engine prompts the user to also choose the printer at run time. If
you specify RB-WINDOW-TITLE, the dialog box title bar contains the
RB-WINDOW-TITLE value. If RB-WINDOW-TITLE is empty, the title
bar displays the report name.
blank
Sends the report directly to the printer specified in the report definition or
specified by RB-PRINTER-NAME, or if RB-OUTPUT-FILE is
specified to that file. Report Engine includes the printer control codes in
the output file for the specified printer, or if no printer is specified, for the
saved printer.
RB-PRINTER-NAME
Specifies the printer on which to print the report. You can specify:
The name of an available Windows printer (for example, HP LaserJet Series III).
In Report Builder choose Report Print Setup to access the Printer Setup dialog box.
This dialog box lists the available Windows printers.
A question mark (?) to allow the user to select a printer at run time. When
RB-PRINTER-NAME contains a question mark, the Printer Setup dialog box
appears.
Regardless of which value is specified, the printer must be a printer that is available to the
machine where Report Engine is running.
316
Specify a port, such as LPT1:. You must include the colon (:).
Specify a blank value to use the printer port saved in the report definition.
Regardless of which value is specified, the port must be on the machine where Report Engine
is running.
RB-REPORT-LIBRARY
Identifies the library that contains the report. The library name can include a path. If you
do not include a path, Report Engine searches for the library in the default directory
specified in the registry or progress.ini . If you have not specified a default library
directory, Report Engine searches for the library in the current working directory. The .prl
extension is optional. The report library must be accessible from the machine on which
Report Engine is running.
NOTE: You must specify the library name. If you leave this parameter blank or if the
library you specify cannot be found or read, Report Engine writes an error in the
status file or RB-STATUS field, depending on the interface or optional
command-line parameters you are using. Regardless of which interface you use,
if you enable RB-DISPLAY-ERRORS, Report Engine displays an error message
box.
For example, a value of c:\projects\reports identifies the report library as
in the subdirectory projects on drive C.
reports.prl
317
Specifies the status of the report generation for the table interface. If you specify the
Report Update (-rbupds) parameter when you invoke Report Engine, Report Engine
updates the RB-STATUS field with information describing where it is in the report
generation process. Table 34 describes the possible parameter values.
Table 34:
RB-STATUS Values
Value
Meaning
STARTED
COMPLETED
Report Engine has finished generating the report. This does not
mean the report has been printed.
ERROR: message
blank
CANCELLED
For example, if you specify -rbupds when you invoke Report Engine, when Report Engine
starts generating the report, it sets the value of the RB-STATUS field to STARTED.
You optionally use RB-STATUS when you use the table interface. You cannot use this
parameter with the PRINTRB interface.
318
Specifies the filename of the report status file into which Report Engine will write the
status information.
This parameter tells Report Engine to create a file containing information about the report
it has generated. This file is called the report status file. If the file does not exist, Report
Engine creates one. If the file does exist, Report Engine overwrites it. If you do not specify
a filename, Report Engine does not generate a status file. If you do not specify the full
pathname, Report Engine uses its current working directory.
For example, to create a status file status.txt in the c:\work\status subdirectory,
specify the following value for the RB-STATUS-FILE parameter:
c:\work\status\status.txt
RB-TAG
Specifies a tag that determines whether to generate a report, based on the value from the
Report Tag (-rbtag) parameter, when you use the table interface. When Report Engine
generates the reports for which you have specified report parameters in the table, it
generates only those whose values in this parameter match the -rbtag parameter value.
If you do not specify a -rbtag value, Report Engine runs all the reports in the Report Engine
table, regardless of the value in the RB-TAG field.
For example, if the Report Engine table contains report records for four different quarterly
reports, you can assign each set of records for a quarter a different RB-TAG value such as
Q1, Q2, Q3, and Q4. Then when you invoke Report Engine, specify the desired tag with
the -rbtag parameter. For example, to run the reports for the first quarter, you specify Q1
as the -rbtag value:
Another way to use this parameter is to store the reports for multiple users in the Report
Engine table, then specify a specific users tag to run only his or her reports.
You optionally use RB-TAG when you use the table interface. You cannot use this
parameter with the PRINTRB or PRNTRB2 interfaces.
319
Controls whether Report Engine allows the user to print a test pattern. A test pattern is
useful for aligning forms or labels in the printer.
The test pattern flag can be either true or false. True means to display a prompt before
printing the report to allow the user the option of printing a test pattern. False means do
not display this prompt.
If the parameter is false, Report Engine does not offer a choice to print a test pattern.
If the parameter is true, Report Engine prompts the user to select whether to print the test
pattern before printing the report. The user can print the test pattern as many times as
necessary and then print the report.
RB-WINDOW-TITLE
The title bar of the dialog box that displays when RB-PRINT-DESTINATION = ?
By default, Report Engine displays the report name in these places. You can enter up to 31
characters for the window title.
3.3
User-defined Parameters
User-defined parameters are character string arguments that you specify in the
RB-OTHER-PARAMETERS field. Regardless of which interface you use, you can specify
multiple user-defined parameters or arguments, but Report Engine expects to find them all in a
single RB-OTHER-PARAMETERS value.
User-defined parameters provide only character values (text strings) to Report Engine. If you
want to access a numeric, date, or logical value, you must perform the conversion from
character to the desired data type within the report definition. See the Overriding a Table
Name section for information about converting values.
You can use user-defined parameters to provide information that you do not want hard-coded
in the report definition. You can also specify user-defined parameters to override table
specifications and prompt for user input.
320
1 Decide upon a parameter name to identify the parameter. Parameter names can be up to 32
characters long and can consist of alphabetic characters (AZ, az), digits (09), and
special characters ($, &, #, %, , _). In addition, parameter names must begin with a letter
(AZ, az). Each name must be unique within the report and cannot contain spaces.
2 In the Report Builder, create a calculated field that uses the RUNTIME-PARAMETER( )
function using the following format for the fields expression:
RUNTIME-PARAMETER("parameter-name")
parameter-name = value
If you allow your users to specify report characteristics at run time, you can create one report
definition and use it with the user input to run many different reports from the same report
definition. See the Prompting for User Input section for information about prompting users
for information.
This section describes the following examples of how to use user-defined parameters:
321
1 In Report Builder, create a calculated field named My-Name with the following
expression:
RUNTIME-PARAMETER("My-Name")
Report Engine prints Todd Winmill in the title area of the report.
322
Separate each parameter with a 1-byte linefeed character (ASCII value 10.) In character
string constants in 4GL code, you can use the two-character symbol ~n to represent the
1-byte linefeed character.
Use only one set of quotation marks for the entire argument. Because all of the parameters
make up one character string, you cannot enclose each parameter in a separate set of
quotation marks.
For example:
"City = Boston~nState = MA~nQuarter = Third-Quarter"
NOTE:
The two-character sequence ~n represents the linefeed character only when you
use it with a 4GL application. If you enter ~n in a Progress fill-in field, Progress
does not convert it to a 1-byte linefeed character.
Another way to separate multiple user-defined parameters is to use CHR(10) to identify a line
feed instead of embedding ~n in a string.
For example:
"City = Boston" + CHR(10) + "State = MA" + CHR(10) + "Quarter =
Third-Quarter"
Notice that when you use CHR(10) instead of ~n, you must enclose each user-defined
parameter in quotation marks.
323
1 In Report Builder, create a calculated field named Sort-Criteria with the following
expression:
Because the CASE function requires that all potential return values have the same data
type, you must list fields that have the same data type for sort criteria options.
"SORTFIELD = NAME"
NOTE:
3.3.1
If you override the sort order at run time, the sort will always be evaluated by Report
Builder.
Each time you run Report Engine, you must specify a value for each of its parameters, even if
that value is blank or zero (for the PRINTRB and PRNTRB2 interfaces) or is the parameter
fields default value (for the table interface). Each of the parameter values must be of the correct
data type for the corresponding Report Engine parameter.
NOTE:
For the PRINTRB and PRNTRB2 interfaces, the parameters must also be in the
correct order (the order in which they appear in Table 31).
324
Table 35:
Default Value
Character
""
Numeric
Logical
NA
When you use the table interface, the default values listed in Table 35 match the Initial Value
that Progress uses by default when you create a new record in the Report Engine table. (The
Initial Value is specified when you create a field in the Data Dictionary.) Thus, when you create
a record, all the fields are set to the default value . However, you must assign actual values to
RB-REPORT-NAME and RB-REPORT-LIBRARY fields before you call Report Engine.
325
3.3.2
You can use both predefined and user-defined parameters to prompt users for input. However,
the user must be using the machine where Report Engine is running.
Prompting for Input with a Predefined Parameter
There are two ways to prompt for user input using predefined parameters. The first way is to
write your own 4GL code to prompt users for input, then pass the values to Report Engine using
predefined parameters. The second way to prompt for user input is to use the built-in Report
Engine prompting mechanism. Several of the predefined parameters allow you to specify a
question mark (?) as the parameter value. When you specify a question mark, Report Engine
automatically prompts the user for input for the parameter.
You can specify a question mark for the RB-PRINT-DESTINATION, RB-PRINTER-NAME,
RB-PRINTER-PORT, and RB-INCLUDE-RECORDS parameters.
Prompting for Input with a User-defined Parameter
You can prompt a user for other report information using a user-defined parameter.
In the User-defined Parameters section, the example shows how to print the report authors
name at the top of the report. To prompt the user to enter his or her name, follow these steps:
1 In the Report Builder, create a calculated field named MYNAME with the following
expression:
RUNTIME-PARAMETER("MYNAME")
326
Use the Report Engine prompt to prompt the user to enter his or her name using the
following code in the RB-OTHER-PARAMETERS parameter:
"MYNAME = ?"
This causes the Report Engine Parameter dialog box shown below to appear:
The Report Engine Parameters dialog box will appear as shown below:
When you prompt users for input, the Report Engine Parameter dialog box title bar contains the
value of the RB-WINDOW-TITLE parameter. If RB-WINDOW-TITLE is empty or
UNKNOWN, Report Engine uses the report name as the dialog box title.
You cannot modify the dimensions of the dialog box to accommodate the anticipated user input.
The dialog box always remains the same size and users can enter up to 512 characters. If the
user chooses the Cancel button, Report Engine does not run the report and writes the
Cancelled message to the report status file or the RB-STATUS field, depending on the
interface and command-line parameters you use. For information about the status file, see the
Verifying Report Status section of Chapter 2, Report Engine Administration.
327
3.3.3
The RUNTIME-PARAMETER() function takes a parameter name as its argument and returns
the value of the parameter as a string. This means that user-defined parameters provide only
character values (text strings) to Report Engine. If you want to access a numeric, date, or logical
value, you must perform the conversion from character to the desired data type within the report
definition.
To convert to numeric, date, or logical values, use the functions shown in the following table in
a calculated field in the report definition:
To convert to . . .
Use . . .
Numeric data
NUMERIC (parameter)
Dates
DATE (parameter)
Logical data
You can also use the RUNTIME-PARAMETER( ) function to get the value of predefined
parameters whose arguments are character strings.
For example, to print the database connection information on the title band line, follow these
steps:
1 In Report Builder, create a calculated field named Connect-String with the following
expression:
RUNTIME-PARAMETER("RB-DB-CONNECTION")
328
4
Report Engine Table Interface
When you use the Report Engine table interface, you store all the Report Engine parameter
values in a database table. This chapter describes:
4.1
4.2
1.
2.
Create a record in the table for each report and assign values to some of the Report Engine
fields in each record.
3.
1 Create a database called Runtable containing the Report Engine table. You can use the
database definition file (%DLC%\bin\rbreport.df) that contains loadable definitions for
the RBREPORT table. (Note that you can give the database any name you choose, and it
can contain other tables, such as the tables that contain your report data.)
42
2 Create an MS-Windows icon with the following command on the command line:
Note that dbname contains the full pathname of the Runtable database.
3 Double-click the MS-Windows icon to start the database server. The icon becomes
minimized.
4 Start Progress and connect to the Runtable database in multi-user mode.
5 Start the Procedure Editor.
6 Run the rbstart1.p procedure.
Here is the code for the rbstart1.p procedure:
rbstart1.p
DO TRANSACTION:
/* 1 */
CREATE RBREPORT.
/* 2 */
ASSIGN
RBREPORT.RB-REPORT-LIBRARY = "c:\dlc\src\aderb\rbsample.prl"
RBREPORT.RB-REPORT-NAME = "Customer Discount"
RBREPORT.RB-PRINT-DESTINATION = "D"
RBREPORT.RB-DISPLAY-STATUS = yes
RBREPORT.RB-DISPLAY-ERRORS = yes.
RELEASE RBREPORT.
END.
/* 3 */
RUN aderb\_prore(false, "-db Runtable -S servername -H hostname
-N networktype -rbdel").
43
2.
Enter the values for five of the record fields. Report Engine uses the default values for the
fields for which you do not specify a value.
3.
Call the _prore.p procedure to invoke Report Engine and specify the NO-WAIT-value and
the database connection information. By specifying false as the NO-WAIT-value, you
instruct Progress to wait until Report Engine completes processing before continuing with
the application. Finally, the Report Delete (-rbdel) parameter deletes the record from the
Report Engine table when the procedure is done.
See the Methods of Invoking Report Engine section for more information about the
procedure.
_prore.p
4.3
44
Contents
(1 of 2)
Data Type
RB-REPORT-LIBRARY
CHARACTER
RB-REPORT-NAME
Report name
CHARACTER
RB-DB-CONNECTION
CHARACTER
RB-INCLUDE-RECORDS
Filter flag
CHARACTER
RB-FILTER
Filter expression
CHARACTER
RB-MEMO-FILE
Memo filename
CHARACTER
RB-PRINT-DESTINATION
Print destination
CHARACTER
RB-PRINTER-NAME
Printer name
CHARACTER
RB-PRINTER-PORT
Printer port
CHARACTER
Contents
(2 of 2)
Data Type
RB-OUTPUT-FILE
Output filename
CHARACTER
RB-NUMBER-COPIES
Number of copies
INTEGER
RB-BEGIN-PAGE
INTEGER
RB-END-PAGE
INTEGER
RB-TEST-PATTERN
LOGICAL
RB-WINDOW-TITLE
Window title
CHARACTER
RB-DISPLAY-ERRORS
LOGICAL
RB-DISPLAY-STATUS
LOGICAL
RB-OTHER-PARAMETERS
User-defined parameters
CHARACTER
Notice that each Report Engine field contains one predefined Report Engine parameter. In
addition to the Report Engine fields listed in Table 41, you can optionally specify the fields
described in Table 42.
Table 42:
Contents
Data Type
RB-TAG
CHARACTER
RB-STATUS
CHARACTER
You can also specify other fields in the Report Engine table. However, Report Engine ignores
any fields other than the ones listed in Table 41 and Table 42.
Progress Software provides a database definition file (%DLC%\bin\rbreport.df) containing
loadable definitions for the Report Engine table interface. You can use this definition file to
create a Report Engine table.
45
Note that in the provided database definition file, the Report Engine table is defined
as a hidden table. This means that it will not appear in any table lists unless you
specify to display hidden tables.
4.3.1
When you create the Report Engine table, be sure to set the initial value of each field to the
default value that Report Engine expects. By default, when you create fields in the Data
Dictionary, Progress assigns the initial values listed in Table 43.
Table 43:
Initial Value
CHARACTER
empty string
INTEGER
LOGICAL
No
These initial values correspond to the expected Report Engine default values except for the
RB-REPORT-LIBRARY and RB-REPORT-NAME fields. Because you must supply a value
for both of these fields, Report Engine cannot accept the default value of an empty string.
4.4
46
4.5
Command-line syntax
Command-line parameters
When you invoke Report Engine you should also consider whether you want to be able to verify
the report processing status and whether you want to employ password security. InChapter 2,
Report Engine Administration, see the Verifying Report Status section for more
information about verifying report status, and see the Using Password Security section for
more information about security considerations.
4.5.1
Command-line Syntax
When you invoke Report Engine, you use the prore32.exe executable with optional
command-line parameters. This is the basic syntax for invoking Report Engine:
SYNTAX
prore32.exe db-connection
parameters
47
4.5.2
Command-line Parameters
You can use all the standard Progress 4GL startup parameters, including the Parameter File (-pf)
parameter, plus some new parameters that are specific to Report Engine.
Table 44 describes the locations where you can specify startup parameters.
Table 44:
Location
startup.pf file
rbstart.pf file
Command line
When you specify parameters on the command line, they override any
other parameter values stored in the startup.pf file or the rbstart.pf
file.
There are many Progress 4GL startup parameters that you might want to use when you invoke
Report Engine. For example, you can use the Date Format (-d) parameter to change the display
format for dates in reports. See the Progress Startup Command and Parameter Reference for a
complete listing of the Progress 4GL startup parameters.
48
Syntax
-rbdel
-rbstatfile filename
Encoded Password
-rbP password
-rbtable table-name
Report Tag
-rbtag tag
-rbupds
-rbcpreportin codepage
-rbcpudfin codepage
The remainder of this section describes each startup parameter, in alphabetical order by
operating system syntax.
Report Code Page In (-rbcpreportin)
-rbcpreportin codepage
Operating
System
and
Syntax
Windows
Use
With
Maximum
Value
Minimum
Value
Single-user
Default
Multi-user
Default
codepage
Operating
System
and
Syntax
Windows
Use
With
Maximum
Value
Minimum
Value
Single-user
Default
Multi-user
Default
codepage
Operating
System
and
Syntax
Windows
Use
With
Maximum
Value
Minimum
Value
Single-user
Default
Multi-user
Default
This parameter tells Report Engine to delete the Report Engine table record corresponding to
the report when it has finished generating the report. If you do not specify this parameter, Report
Engine leaves the record intact.
410
Operating
System
and
Syntax
Windows
Use
With
Maximum
Value
Minimum
Value
Single-user
Default
Multi-user
Default
filename
The pathname of the report status file into which Report Engine will write the status
information.
This parameter tells Report Engine to create a file containing information about the reports it
has generated. This file is called the report status file. If the file does not exist, Report Engine
creates one. If the file does exist, Report Engine overwrites it. If you do not specify the full
pathname, Report Engine uses its current working directory. If the Report Engine table contains
multiple reports, the output file will contain information about all of the reports.
See Chapter 2, Report Engine Administration, for a description of the report status file.
411
Windows
-rbP password
Use
With
Maximum
Value
Minimum
Value
Single-user
Default
Multi-user
Default
password
An encoded password.
This parameter is an optional Report Engine-specific version of the Progress 4GL Password (-P)
startup parameter. The -rbP parameter allows you to hide the value of a password.
Report Engine assumes that the value of the Encoded Password (-rbP) parameter was encoded
using the aderb/_rbpwenc.p and therefore applies the reverse encoding and treats the result as
if it had been provided by the Password (-P) parameter. See the Using Password Security
section in Chapter 2, Report Engine Administration for more information about security
considerations.
You can use this parameter when you invoke Report Engine on the command line or in place of
the -P parameter in the RB-DB-CONNECTION field of the Report Engine record.
412
Operating
System
and
Syntax
Windows
Use
With
Maximum
Value
Minimum
Value
Single-user
Default
Multi-user
Default
RBREPORT
RBREPORT
table-name
The name of the Report Engine table containing the report parameters.
If you do not specify this parameter, Report Engine assumes the table name is RBREPORT.
When you invoke Report Engine, you must specify the connection parameters that tell Report
Engine how to connect to the database containing this table. If you connect to more than one
database on the command line, it looks for this table in the first database specified.
Report Tag (-rbtag)
-rbtag tag
Operating
System
and
Syntax
Windows
Use
With
Maximum
Value
Minimum
Value
Single-user
Default
Multi-user
Default
tag
Operating
System
and
Syntax
Windows
Use
With
Maximum
Value
Minimum
Value
Single-user
Default
Multi-user
Default
The Report Update Status (-rbupds) parameter tells Report Engine to update the RB-STATUS
field in the Report Engine table for each report.
If you specify the Report Update Status (-rbupds) parameter when you invoke Report Engine,
Report Engine updates the RB-STATUS field with information describing where it is in the
report generation process.Table 46 describes the possible parameter values Report Engine can
provide to the RB-STATUS field.
Table 46:
RB-STATUS Values
Value
Meaning
STARTED
COMPLETED
Report Engine has finished generating the report. This does not mean
the report has been printed, only that it has been sent to the printer
queue.
ERROR: message
blank
CANCELLED
If you do not specify the -rbupds parameter when you invoke Report Engine, Report Engine
ignores the RB-STATUS field, and the field remains blank.
414
4.5.3
Note that _prore.p is the name of a Report Engine procedure that invokes prore.exe
automatically using the specified parameters. NO-WAIT-value specifies whether to wait for
Report Engine to complete processing before running the remainder of the application. The
command-line arguments value is a character that must begin with the database name and
connection parameters required to connect to the Report Engine database, followed by any other
Progress startup or database connection parameters or Report Engine startup parameters.
NOTE:
The database connection information, plus all the optional parameters, cannot exceed
114 characters. If you must enter more characters, use a parameter (.pf) file to hold
the parameters.
For example, you might use the following statement to invoke Report Engine:
RUN aderb\_prore.p(true, "-db sample.db -1 -rbtable Rep-Eng -rbtag Q1")
415
parameters
Note that prore32.exe is the name of the Report Engine executable. The db-connection
argument specifies the name of the database containing the Report Engine table and other
connection information, such as host and server names. The parameters specify any Progress
Atlas database connection or startup parameters, or Report Engine startup parameters.
For example, you might use the following statement to invoke Report Engine:
OS-COMMAND NO-WAIT prore32.exe -db sample.db -1 -rbtable Rep-Eng -rbdel
In this statement, sample.db is the name of the database that contains the Rep-Eng table. The
-rbtable parameter specifies that Rep-Eng is the Report Engine table, and -rbdel indicates to
delete the Report Engine table record for each report when it completes processing the reports.
416
parameters
Note that prore32.exe is the name of the Report Engine executable. The db-connection
argument specifies the name of the database containing the Report Engine table and other
connection information, such as host and server names. The parameters specify any Progress
startup or database connection parameters, or Report Engine startup parameters.
For example, you might use the following statement to invoke Report Engine:
prore32.exe -db sample.db -1 -rbtable Rep-Eng
In this statement, sample.db is the name of the database that contains the Rep-Eng table and
the -rbtable parameter specifies that Rep-Eng is the Report Engine table.
You can also create a .BAT file that uses the utility to run the command line.
Using an MS-Windows Icon
You can invoke Report Engine from an MS-Windows icon if you enter the command line in the
icons Command Line field. Use the following syntax in the Command Line field:
SYNTAX
prore32.exe db-connection
parameters
Note that prore32.exe is the name of the Report Engine. The db-connection argument
specifies the name of the database containing the Report Engine table and other connection
information, such as host and server name. The parameters specify any Progress startup or
database connection parameters or Report Engine startup parameters.
417
In this statement, sample.db is the name of the database that contains the Rep-Eng table. The
-rbtable parameter specifies that Rep-Eng is the Report Engine table, and -rbupds tells Report
Engine to update the RB-STATUS field in the Rep-Eng table for each report.
Using the Start Menu Run Option
You can invoke Report Engine from the Run option from the Start menu. To do so, simply
choose Start Run, enter the command line in the Command Line field, then choose OK. Use
the following syntax in the Command Line field:
SYNTAX
prore32.exe db-connection
parameters
Note that prore32.exe is the name of the Report Engine executable. The db-connection
argument specifies the name of the database containing the Report Engine table and other
connection information, such as host and server names. The parameters specify any Progress
startup or database connection parameters or Report Engine startup parameters.
For example, you might use the following command to invoke Report Engine:
prore32.exe -db sample.db -1 -rbtable Rep-Eng
In this statement, sample.db is the name of the database that contains the Rep-Eng table, and
the -rbtable parameter specifies that Rep-Eng is the Report Engine table.
418
4.6
4.7
Generating a list of reports, printing the reports, and updating the RB-STATUS field
(rbplist1.p)
Generating a list of reports, prompting the user to select which reports to run, and running
the reports (rblist2.p)
All the samples illustrate how to run Report Engine with a multi-user database. The samples use
the rbsample.prl report library and the Progress Sports database.
419
1 Create a database called Runtable containing the Report Engine table. You can use the
database definition file (%DLC%\bin\rbreport.df) that contains loadable definitions for
the RBREPORT table. (Note that you can give the database any name you choose, and it
can contain other tables, such as the tables that contain your report data.)
2 Create an MS-Windows icon with the following command on the command line:
Note that dbname contains the full pathname of the Runtable database.
3 Double-click the MS-Windows icon to start the database server. The icon becomes
minimized.
4 Start Progress and connect to the Runtable database in multi-user mode using the
parameters shown in step 2.
5 Start the Procedure Editor.
6 Run the procedures.
To run the procedures, you must specify the appropriate pathname for the Report Engine
database and be connected to the Report Engine database in multi-user mode. In the examples,
Runtable is the Report Engine database name.
4.7.1
The rbfilt1.p sample procedure runs the Customer Discount report in the rbsample.prl
report library with the specified filter override:
420
rbfilt1.p
DO TRANSACTION:
/* 1 */
CREATE RBREPORT.
/* 2 */
ASSIGN
RBREPORT.RB-REPORT-LIBRARY = "c:\dlc\src\aderb\rbsample.prl"
RBREPORT.RB-REPORT-NAME = "Customer Discount"
RBREPORT.RB-PRINT-DESTINATION = "D"
RBREPORT.RB-INCLUDE-RECORDS = "O"
RBREPORT.RB-FILTER = "IN-RANGE(Order-Line.Discount, 15, 30)"
RBREPORT.RB-DISPLAY-STATUS = yes
RBREPORT.RB-DISPLAY-ERRORS = yes.
/* 3 */
RELEASE RBREPORT.
END.
/* 4 */
RUN aderb\_prore.p(false,
"-db Runtable -S servername -H hostname -N networktype -rbdel").
2.
3.
Explicitly release the RBREPORT record so that Report Engine can use it.
4.
Call _prore to invoke Report Engine and run the report with the filter override. Then use
the Report Delete (-rbdel) parameter to delete the record from the Report Engine table
when the procedure is done.
421
4.7.2
The rbprint1.p sample procedure runs the Accts Receivable report in the rbsample.prl report
library and prompts the user for the printer destination and printer name using the Report Engine
built-in prompting mechanism:
rbprint1.p
DO TRANSACTION:
/* 1 */
CREATE RBREPORT.
/* 3 */
ASSIGN
RBREPORT.RB-REPORT-LIBRARY = "c:\dlc\src\aderb\rbsample.prl"
RBREPORT.RB-REPORT-NAME = "Accts Receivable"
RBREPORT.RB-PRINT-DESTINATION = "?"
RBREPORT.RB-PRINTER-NAME = "?"
RBREPORT.RB-DISPLAY-STATUS = yes
RBREPORT.RB-DISPLAY-ERRORS = yes.
/* 3 */
RELEASE RBREPORT.
END.
/* 4 */
RUN aderb\_prore.p(false,
"-db Runtable -S servername -H hostname -N networktype -rbdel").
422
1.
2.
Assign values to the record, but specify questions marks (?) for the printer destination and
printer name fields. The question marks instruct Report Engine to prompt the user for input
for those fields.
3.
Explicitly release the RBREPORT record so that Report Engine can use it.
4.
Call _prore to invoke Report Engine and run the report with the user prompts. As shown
in the previous sample procedure, you use the Report Delete (-rbdel) parameter to delete
the record from the Report Engine table when the procedure is done.
4.7.3
The rbfilt2.p sample procedure runs the Customer List report in the rbsample.prl report
library and prompts the user for minimum and maximum values for the filter condition:
rbfilt2.p
DEF VAR high-value AS INTEGER INITIAL 0.
DEF VAR low-value AS INTEGER INITIAL 0.
DEF VAR rb-filter-value AS CHARACTER INITIAL "".
/* 1 */
FORM" Enter Low Value for CUSTOMER NUMBER: " low-value at 20
"Enter High Value for CUSTOMER NUMBER: " high-value at 20
WITH FRAME TEST-FRAME CENTERED NO-LABELS.
SKIP
/* 2 */
UPDATE low-value high-value WITH FRAME TEST-FRAME.
HIDE FRAME TEST-FRAME.
/* 3 */
rb-filter-value = "Customer.Cust-num >= " + STRING(low-value) +
" AND Customer.Cust-num <= " + STRING(high-value).
/* 4 */
DO TRANSACTION:
CREATE RBREPORT.
ASSIGN
RBREPORT.RB-REPORT-LIBRARY = "c:\dlc\src\aderb\rbsample.prl"
RBREPORT.RB-REPORT-NAME = "Customer List"
RBREPORT.RB-PRINT-DESTINATION = "D"
RBREPORT.RB-INCLUDE-RECORDS = "O"
RBREPORT.RB-FILTER = rb-filter-value
RBREPORT.RB-DISPLAY-ERRORS = yes
RBREPORT.RB-DISPLAY-STATUS = yes.
RELEASE RBREPORT.
END.
RUN aderb\_prore.p(false,
"-db Runtable -S servername -H hostname -N networktype -rbdel").
423
2.
3.
4.
Run the Customer List report with the filter override on the report.
4.7.4
The rbplist1.p sample procedure runs all the reports in the rbsample.prl report library and
updates the RB-STATUS field. This procedure assumes that all of the reports in the list
generated by _getname.p use the Sports database. Report Engine connects to the Sports
database only once on startup, and the same connection is used for each report since the =>
syntax is used in the RB-DB-CONNECTION field of the RBREPORT table.
To run the rbplist1.p procedure with the rbsample.prl report library, execute the following
command:
RUN rblist1.p("c:\dlc\src\aderb\rbsample.prl").
424
VAR
VAR
VAR
VAR
/* 2 */
DEF INPUT PARAMETER report-library AS CHARACTER.
/* 3 */
RUN aderb/_getname.p(report-library, OUTPUT report-list,
OUTPUT report-count).
/* 4 */
REPEAT report-number = 1 TO report-count:
CREATE RBreport.
current-report-name = ENTRY(report-number, report-list).
ASSIGN
RBREPORT.RB-REPORT-LIBRARY = report-library
RBREPORT.RB-REPORT-NAME = current-report-name
RBREPORT.RB-DB-CONNECTION = "sports => logsport"
RBREPORT.RB-PRINT-DESTINATION = "D"
RBREPORT.RB-DISPLAY-STATUS = yes
RBREPORT.RB-DISPLAY-ERRORS = yes.
RELEASE RBREPORT.
END.
/* 5 */
RUN aderb\_prore.p(false,"-db Runtable -S servername -H hostname
-N networktype -db c:\data\sports -1 -ld logsport -rbupds").
/* 6 */
FOR EACH RBREPORT:
MESSAGE "Status of Report " + RBREPORT.RB-REPORT-NAME +
": " + RBREPORT.RB-STATUS VIEW-AS ALERT-BOX.
DELETE RBREPORT.
END.
425
2.
3.
4.
5.
Run each report record in the RBREPORT table using the connection to the database on
the command line. Then, update the RB-STATUS field.
6.
For each record, view RB-STATUS field as an Alert Box, then delete the record.
4.7.5
The rblist2.p sample procedure generates a list of all the reports in the rbsample.prl report
library, prompts the user to specify which reports to run, then runs the reports. This procedure
assumes that all of the reports in the list generated by _getname.p use the Sports database.
Report Engine connects to the database only once on startup, and the same connection is used
for each report since the => syntax is used in the RB-DB-CONNECTION field of the
RBREPORT table.
To run the rblist2.p procedure with the rbsample.prl report library, execute the following
command:
RUN rblist2.p("c:\dlc\src\aderb\rbsample.prl").
426
/* 2 */
DEF INPUT PARAMETER report-library AS CHARACTER.
/* 3 */
DEF VAR user-answer AS LOGICAL.
/* 4 */
RUN aderb/_getname.p(report-library, OUTPUT report-list,
OUTPUT report-count).
/* 5 */
DO report-number = 1 TO report-count:
current-report-name = ENTRY(report-number, report-list).
MESSAGE "Report Number" + STRING(report-number) + " is "
+ current-report-name + ". Do you want to print it?"
VIEW-AS ALERT-BOX QUESTION BUTTONS yes-no
UPDATE user-answer.
IF (user-answer) THEN DO TRANSACTION:
CREATE RBREPORT.
ASSIGN
RBREPORT.RB-REPORT-LIBRARY = report-library
RBREPORT.RB-REPORT-NAME = current-report-name
RBREPORT.RB-DB-CONNECTION = "sports => logsport"
RBREPORT.RB-PRINT-DESTINATION = "D"
RBREPORT.RB-DISPLAY-STATUS = yes
RBREPORT.RB-DISPLAY-ERRORS = yes.
RELEASE RBREPORT.
END.
END.
/* 6 */
RUN aderb\_prore.p(false,"-db Runtable -S servername -H hostname
-N networktype -db c:\data\sports -1 -ld logsport -rbdel").
427
428
1.
2.
3.
4.
5.
Prompt the user and add the selected reports to the Runtable database.
6.
5
Report Engine PRINTRB and PRNTRB2
Interfaces
The Report Engine PRINTRB and PRNTRB2 interfaces allow you to invoke Report Engine
from the Progress 4GL using parameters instead of tables and fields to specify report
parameters.
This chapter describes:
5.1
Start Progress.
2.
For PRINTRB, specify each of the nineteen parameters for the report in the RUN
statement that calls the aderb/_printrb.p procedure file.
3.
For PRNTRB2, specify each of the twenty parameters for the report in the RUN statement
that calls the aderb/_prntrb2.p procedure file.
NOTE: The PRINTRB interface does not support all Report Builder Version 8.0
functionality and is provided solely for backward compatibility.
5.2
52
5.3
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
RB-REPORT-LIBRARY */
RB-REPORT-NAME */
RB-DB-CONNECTION */
RB-INCLUDE-RECORDS */
RB-FILTER */
RB-MEMO-FILE */
RB-PRINT-DESTINATION */
RB-PRINTER-NAME */
RB-PRINTER-PORT */
RB-OUTPUT-FILE */
RB-NUMBER-COPIES - zero */
RB-BEGIN-PAGE - zero */
RB-END-PAGE - zero */
RB-TEST-PATTERN */
RB-WINDOW-TITLE */
RB-DISPLAY-ERRORS */
RB-DISPLAY-STATUS */
RB-NO-WAIT */
RB-OTHER-PARAMETERS */
53
5.4
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
RB-REPORT-LIBRARY */
RB-REPORT-NAME */
RB-DB-CONNECTION */
RB-INCLUDE-RECORDS */
RB-FILTER */
RB-MEMO-FILE */
RB-PRINT-DESTINATION */
RB-PRINTER-NAME */
RB-PRINTER-PORT */
RB-OUTPUT-FILE */
RB-NUMBER-COPIES - zero */
RB-BEGIN-PAGE - zero */
RB-END-PAGE - zero */
RB-TEST-PATTERN */
RB-WINDOW-TITLE */
RB-DISPLAY-ERRORS */
RB-DISPLAY-STATUS */
RB-NO-WAIT */
RB-OTHER-PARAMETERS */
RB-STATUS-FILE */
54
Parameter Name
Contents
(1 of 2)
Data Type
RB-REPORT-LIBRARY
CHARACTER
RB-REPORT-NAME
Report name
CHARACTER
RB-DB-CONNECTION
CHARACTER
RB-INCLUDE-RECORDS
Filter flag
CHARACTER
RB-FILTER
Filter expression
CHARACTER
RB-MEMO-FILE
Memo filename
CHARACTER
RB-PRINT-DESTINATION
Print destination
CHARACTER
RB-PRINTER-NAME
Printer name
CHARACTER
RB-PRINTER-PORT
Printer port
CHARACTER
RB-OUTPUT-FILE
Output filename
CHARACTER
RB-NUMBER-COPIES
Number of copies
INTEGER
RB-BEGIN-PAGE
INTEGER
RB-END-PAGE
INTEGER
RB-TEST-PATTERN
LOGICAL
RB-WINDOW-TITLE
Window title
CHARACTER
RB-DISPLAY-ERRORS
LOGICAL
RB-DISPLAY-STATUS
LOGICAL
RB-NO-WAIT
Synchronous or asynchronous
processing
LOGICAL
55
Parameter Name
Contents
(2 of 2)
Data Type
RB-OTHER-PARAMETERS
User-defined parameters
N/A
RB-STATUS-FILE
Status filename
CHARACTER
5.5
All the samples illustrate how to run Report Engine with a local multi-user database. The
samples use the rbsample.prl report library and the Progress Sports database. The
rbsample.prl report library is located in %DLC%\SRC\aderb.
You can run reports from a 4GL application by running the _printrb.p procedure. This
procedure runs the report using the parameters you specify. You specify the desired parameters
for each report in the RUN statement when you run Report Engine.
56
5.5.1
The rbfilt3.p sample procedure runs the Customer Discount report in the rbsample.prl
report library with the specified filter override:
rbfilt3.p
RUN aderb\_printrb(
"c:\dlc\src\aderb\rbsample.prl",
/* RB-REPORT-LIBRARY */
"Customer Discount",
/* RB-REPORT-NAME */
"",
/* RB-DB-CONNECTION */
"O",/* RB-INCLUDE-RECORDS - letter O */
"IN-LIST(Order-Line.Discount,
10,15,35) > 0",
/* RB-FILTER */
"",
/* RB-MEMO-FILE */
"D",
/* RB-PRINT-DESTINATION */
"",
/* RB-PRINTER-NAME */
"",
/* RB-PRINTER-PORT */
"",
/* RB-OUTPUT-FILE */
0,
/* RB-NUMBER-COPIES - zero */
0,
/* RB-BEGIN-PAGE - zero */
0,
/* RB-END-PAGE - zero */
no,
/* RB-TEST-PATTERN */
"",
/* RB-WINDOW-TITLE */
yes,
/* RB-DISPLAY-ERRORS */
yes,
/* RB-DISPLAY-STATUS */
no,
/* RB-NO-WAIT */
"").
/* RB-OTHER-PARAMETERS */
Notice that the procedure specifies all nineteen of the PRINTRB interface parameters in the
order in which they appear, even though it overrides only the filter condition values.
57
If you are using the PRNTRB2 interface you must modify the procedure to run
aderb\_prntrb2 and include the RB-STATUS-FILE parameter.
5.5.2
The rbprint2.p sample procedure runs the Accts Receivable report in the rbsample.prl report
library and prompts the user for the printer destination and printer name using the Report Engine
built-in prompting mechanism:
rbprint2.p
RUN aderb\_printrb(
"c:\dlc\src\aderb\rbsample.prl",
"Accts Receivable",
"",
"",
"",
"",
"?",
"?",
"",
"",
0,
0,
0,
no,
"",
yes,
yes,
no,
"").
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
RB-REPORT-LIBRARY */
RB-REPORT-NAME */
RB-DB-CONNECTION */
RB-INCLUDE-RECORDS */
RB-FILTER */
RB-MEMO-FILE */
RB-PRINT-DESTINATION */
RB-PRINTER-NAME */
RB-PRINTER-PORT */
RB-OUTPUT-FILE */
RB-NUMBER-COPIES - zero */
RB-BEGIN-PAGE - zero */
RB-END-PAGE - zero */
RB-TEST-PATTERN */
RB-WINDOW-TITLE */
RB-DISPLAY-ERRORS */
RB-DISPLAY-STATUS */
RB-NO-WAIT */
RB-OTHER-PARAMETERS */
Although you might expect to see code that explicitly prompts the user for the printer
destination and printer port, you do not have to do this. Simply enter question marks (?) in the
RB-PRINTER-NAME and RB-PRINTER-PORT parameters, and Report Engine automatically
allows the user to select the print destination (screen or printer) and printer at run time.
NOTE:
58
If you are using the PRNTRB2 interface you must modify the procedure to run
aderb\_prntrb2 and include the RB-STATUS-FILE parameter.
5.5.3
The rbfilt4.p sample procedure runs the Customer List report in the rbsample.prl report
library and prompts the user for minimum and maximum values for the filter condition:
rbfilt4.p
DEF VAR high-value AS INTEGER INITIAL 0.
DEF VAR low-value AS INTEGER INITIAL 0.
DEF VAR rb-filter-value AS CHARACTER INITIAL "".
/* 1 */
FORM "Enter Low Value for CUSTOMER NUMBER: " low-value at 20
"Enter High Value for CUSTOMER NUMBER: " high-value at 20
WITH FRAME TEST-FRAME CENTERED NO-LABELS.
SKIP
/* 2 */
UPDATE low-value high-value WITH FRAME TEST-FRAME.
HIDE FRAME TEST-FRAME.
/* 3 */
rb-filter-value = "Customer.Cust-num >= " + STRING(low-value) +
" AND Customer.Cust-num <= " + STRING(high-value).
/* 4 */
RUN aderb\_printrb(
"c:\dlc\src\aderb\rbsample.prl",
"Customer List",
"",
"O",
rb-filter-value,
"",
"D",
"",
"",
"",
0,
0,
0,
no,
"",
yes,
yes,
no,
"")
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
RB-REPORT-LIBRARY */
RB-REPORT-NAME */
RB-DB-CONNECTION */
RB-INCLUDE-RECORDS - letter O*/
RB-FILTER */
RB-MEMO-FILE */
RB-PRINT-DESTINATION */
RB-PRINTER-NAME */
RB-PRINTER-PORT */
RB-OUTPUT-FILE */
RB-NUMBER-COPIES - zero */
RB-BEGIN-PAGE -zero */
RB-END-PAGE - zero */
RB-TEST-PATTERN */
RB-WINDOW-TITLE */
RB-DISPLAY-ERRORS */
RB-DISPLAY-STATUS */
RB-NO-WAIT */
RB-OTHER-PARAMETERS */
59
2.
3.
4.
NOTE:
5.5.4
If you are using the PRNTRB2 interface you must modify the procedure to run
aderb\_prntrb2 and include the RB-STATUS-FILE parameter.
You can run all the reports in the rbsample.prl report library as a batch job with the same set
of parameters using rbbatch.p.
To run the rbbatch.p procedure with the rbsample.prl report library, execute the following
command:
RUN rbbatch.p ("c:\dlc\src\aderb\rbsample.prl")
510
(1 of 2)
RB-REPORT-NAME AS CHARACTER INITIAL "".
RB-DB-CONNECTION AS CHARACTER INITIAL "".
RB-INCLUDE-RECORDS AS CHARACTER INITIAL "".
RB-FILTER AS CHARACTER INITIAL "".
RB-MEMO-FILE AS CHARACTER INITIAL "".
RB-PRINT-DESTINATION AS CHARACTER INITIAL "".
RB-PRINTER-NAME AS CHARACTER INITIAL "".
RB-PRINTER-PORT AS CHARACTER INITIAL "".
RB-OUTPUT-FILE AS CHARACTER INITIAL "".
RB-NUMBER-COPIES AS INTEGER INITIAL 1.
RB-BEGIN-PAGE AS INTEGER INITIAL 0.
RB-END-PAGE AS INTEGER INITIAL 0.
RB-TEST-PATTERN AS LOGICAL INITIAL no.
RB-WINDOW-TITLE AS CHARACTER INITIAL "".
RB-DISPLAY-ERRORS AS LOGICAL INITIAL yes.
RB-DISPLAY-STATUS AS LOGICAL INITIAL yes.
RB-NO-WAIT AS LOGICAL INITIAL no.
RB-OTHER-PARAMETERS AS CHARACTER INITIAL "".
/* 2 */
DEF VAR report-list AS CHARACTER.
DEF VAR report-count AS INTEGER.
DEF VAR report-number AS INTEGER.
/* 3 */
DEF INPUT PARAMETER report-library AS CHARACTER.
/* 4 */
RUN aderb/_getname.p (report-library, OUTPUT report-list,
OUTPUT report-count).
511
(2 of 2)
/* 5 */
DO report-number = 1 to report-count:
RB-REPORT-NAME = entry (report-number, report-list).
RUN aderb/_printrb (report-library,
RB-REPORT-NAME,
RB-DB-CONNECTION,
RB-INCLUDE-RECORDS,
RB-FILTER,
RB-MEMO-FILE,
RB-PRINT-DESTINATION,
RB-PRINTER-NAME,
RB-PRINTER-PORT,
RB-OUTPUT-FILE,
RB-NUMBER-COPIES,
RB-BEGIN-PAGE,
RB-END-PAGE,
RB-TEST-PATTERN,
RB-WINDOW-TITLE,
RB-DISPLAY-ERRORS,
RB-DISPLAY-STATUS,
RB-NO-WAIT,
RB-OTHER-PARAMETERS).
END.
Define variables for the report parameters. Note that you must specify each parameter for
each report that you run, but that you can assign each parameter a default value for this
procedure.
2.
Define report-list and report-count for the _getname.p output, and report-number to keep
track of the reports.
3.
4.
5.
NOTE:
512
If you are using the PRNTRB2 interface you must modify the procedure to run
aderb\_prntrb2 and include the RB-STATUS-FILE parameter.
5.5.5
In the following example, rbprompt.p, you prompt the user to specify whether to generate each
report in the rbsample.prl report library.
To run the rbprompt.p procedure with the rbsample.prl report library, execute the following
command:
RUN rbprompt.p ("c:\dlc\src\aderb\rbsample.prl")
(1 of 2)
RB-REPORT-NAME AS CHARACTER INITIAL "".
RB-DB-CONNECTION AS CHARACTER INITIAL "".
RB-INCLUDE-RECORDS AS CHARACTER INITIAL "".
RB-FILTER AS CHARACTER INITIAL "".
RB-MEMO-FILE AS CHARACTER INITIAL "".
RB-PRINT-DESTINATION AS CHARACTER INITIAL "".
RB-PRINTER-NAME AS CHARACTER INITIAL "".
RB-PRINTER-PORT AS CHARACTER INITIAL "".
RB-OUTPUT-FILE AS CHARACTER INITIAL "".
RB-NUMBER-COPIES AS INTEGER INITIAL 1.
RB-BEGIN-PAGE AS INTEGER INITIAL 0.
RB-END-PAGE AS INTEGER INITIAL 0.
RB-TEST-PATTERN AS LOGICAL INITIAL no.
RB-WINDOW-TITLE AS CHARACTER INITIAL "".
RB-DISPLAY-ERRORS AS LOGICAL INITIAL yes.
RB-DISPLAY-STATUS AS LOGICAL INITIAL yes.
RB-NO-WAIT AS LOGICAL INITIAL no.
RB-OTHER-PARAMETERS AS CHARACTER INITIAL "".
513
514
1.
2.
3.
(2 of 2)
5.
Prompt the user to specify which reports to print, and print the reports.
NOTE:
If you are using the PRNTRB2 interface you must modify the procedure to run
aderb\_prntrb2 and include the RB-STATUS-FILE parameter.
5.5.6
The following example, rbdbconn.p, illustrates how to override the database connection for a
report. If the report was saved with a local database in single-user mode and you want to
override it with a remote database in multi-user mode, run the rbdbconn.p procedure.
Here is the rbdbconn.p procedure:
rbdbconn.p
RUN aderb\_printrb(
"c:\dlc\src\aderb\rbsample.prl",
"Accts Receivable",
"sports = -db sports -H newhost
-S newserver -N TCP",
/*
"",
"",
"",
"",
"",
"",
"",
0,
0,
0,
no,
"",
yes,
yes,
no,
"").
NOTE:
/* RB-REPORT-LIBRARY */
/* RB-REPORT-NAME */
RB-DB-CONNECTION */
/* RB-INCLUDE-RECORDS */
/* RB-FILTER */
/* RB-MEMO-FILE */
/* RB-PRINT-DESTINATION */
/* RB-PRINTER-NAME */
/* RB-PRINTER-PORT */
/* RB-OUTPUT-FILE */
/* RB-NUMBER-COPIES - zero */
/* RB-BEGIN-PAGE - zero */
/* RB-END-PAGE - zero */
/* RB-TEST-PATTERN */
/* RB-WINDOW-TITLE */
/* RB-DISPLAY-ERRORS */
/* RB-DISPLAY-STATUS */
/* RB-NO-WAIT */
/* RB-OTHER-PARAMETERS */
If you are using the PRNTRB2 interface you must modify the procedure to run
aderb\_prntrb2 and include the RB-STATUS-FILE parameter.
515
516
Index
A
Applications
running reports 56
Audience ix
Errors
RO-ERROR-CODE 212
RO-ERROR-MESSAGE 212
Bold typeface
as typographical convention x
Fields
RB-STATUS 213
D
Database connection, overriding
515
Database definition files 42
defprint.p procedure 24
Drivers
printer 15
Files
rbreport.df 42
rbrun.out 210
rbstart.pf 48
Report Status 210
startup.pf 48
_prore.p 415
Forms
printing 320
G
Generating reports
listing 22
_getini.p procedure 27
Help
xiv
Pages 213
I
Italic typeface
as typographical convention x
Passwords
_rbpwenc.p procedure 29
Keystrokes x
_prdef.p procedure 24
Listing reports
_getname.p procedure 511
M
Manual
organization of ix
syntax notation xi
Messages
displaying descriptions xiv
Monospaced typeface
as typographical convention x
Multiple reports 419
O
OS-COMMAND statement 416
Overriding a database connection
515
Index2
Parameters
predefined 33, 44
RUNTIME-PARAMETER 328
user defined 320
Printing
test patterns 320
using forms 320
printlst.p procedure 26
PRINTRB interface
_printrb.p procedure 52
_printrb.p procedure 52
_prlist.p procedure 25
Procedures
defprint.p 24
_getini.p 27
_getname.p 22, 511
_prdef.p 24
printlst.p 26
_printrb.p 52
_prlist.p 25
progini.p 28
_rbpwenc.p 29
reptlist.p 23
Index
progini.p procedure 28
Prompting for user input
predefined parameters 326
user-defined parameters 326
_prore.p procedure 415
R
-rbcpreportin startup paramete 49
-rbcpudfin startup parameter 410
-rbdel startup parameter 410
-rbP startup parameter 29, 412
_rbpwenc.p procedure 29
rbreport.df file 42
rbrun.out file 210
-rbstatfile startup parameter 210,
411
-rbtable startup parameter 413
-rbtag startup paramete 413
-rbupds startup parameter 213,
414
rbstart.pf file 48
RB-BEGIN-PAGE predefined
Report Engine parameter 33,
34, 55
RB-BEGIN-PAGE Report Engine
table field name 45
RB-DB-CONNECTION predefined
Report Engine parameter 33,
35, 55
RB-DB-CONNECTION Report
Engine table field name 44
RB-DISPLAY ERRORS
predefined Report Engine
parameter 33, 55
RB-DISPLAY ERRORS Report
Engine table field name 45
RB-DISPLAY-STATUS
predefined Report Engine
parameter 34, 311, 55
RB-DISPLAY-STATUS Report
Engine table field name 45
RB-END-PAGE predefined Report
Engine parameter 33, 311, 55
RB-END-PAGE Report Engine
table field name 45
RB-FILTER predefined Report
Engine parameter 33, 311, 55
RB-FILTER Report Engine table
field name 44
RB-INCLUDE-RECORDS
predefined Report Engine
parameter 33, 313, 55
RB-INCLUDE-RECORDS Report
Engine table field name 44
RB-MEMO-FILE predefined
Report Engine parameter 33,
314, 55
RB-MEMO-FILE Report Engine
table field name 44
RB-NO-WAIT predefined Report
Engine parameter 34, 314, 55
RB-NUMBER-COPIES predefined
Report Engine parameter 33,
314, 55
RB-NUMBER-COPIES Report
Engine table field name 45
Index3
RB-PRINT-DESTINATION
predefined Report Engine
parameter 33, 315, 55
RB-PRINT-DESTINATION
Report Engine table field name
44
RB-TEST-PATTERN predefined
Report Engine parameter 33,
320, 55
RB-PRINTER-NAME predefined
Report Engine parameter 33,
316
RB-TEST-PATTERN Report
Engine table field name 45
RB-PRINTER-NAME Report
Engine table field name 44
RB-PRINTER-NAME Report
predefined Report Engine
parameter 55
RB-PRINTER-PORT predefined
Report Engine parameter 33,
317, 55
RB-PRINTER-PORT Report
Engine table field name 44
RB-REPORT-LIBRARY
predefined Report Engine
parameter 33, 317, 55
RB-REPORT-LIBRARY Report
Engine table field name 44
RB-REPORT-NAME predefined
Report Engine parameter 33,
318, 55
RB-REPORT-NAME Report
Engine table field name 44, 45
Index4
RB-WINDOW-TITLE predefined
Report Engine parameter 33,
320, 55
RB-WINDOW-TITLE Report
Engine table field name 45
Records
report engine
See Report Engine table
Report Code Page In (-rbcpreportin)
startup parameter 49
Report Engine 11
invoking 47
Report Engine parameters 32
guidelines and restrictions 324
incorporating in the report
definitions 328
predefined 32, 326
prompting for user input 326
RB-BEGIN-PAGE 33, 34, 55
RB-DB-CONNECTION 33,
35, 55
RB-DISPLAY ERRORS 33,
55
RB-DISPLAY-STATUS 34,
311, 55
Index
RB-END-PAGE 33, 311, 55
RB-FILTER 33, 311, 55
RB-INCLUDE-RECORDS 33,
313, 55
RB-MEMO-FILE 33, 314, 55
RB-NO-WAIT 34, 314, 55
RB-NUMBER-COPIES 33,
314, 55
RB-OUTPUT-FILE 33, 315,
319, 55
RB-PRINT-DESTINATION
33, 315, 55
RB-PRINTER-NAME 33,
316, 55
RB-PRINTER-PORT 33, 317,
55
RB-REPORT-LIBRARY 33,
317, 55
RB-REPORT-NAME 33, 318,
55
RB-STATUS 318
RB-TAG 319
RB-TEST-PATTERN 33, 320,
55
RB-WINDOW-TITLE 33,
320, 55
table override 320
user-defined 320, 326
Report libraries
listing reports 22
Report Status file 210
RB-STATUS 213
RO-ERROR-CODE 212
RO-ERROR-MESSAGE 212
Report Status File (-rbstatfile)
startup parameter 210, 411
Report Tag (-rbtag) startup
parameter 413
Report title 320
Report Update Status (-rbupds)
startup parameter 213, 414
Reports
generating a list 22
pages 213
running from an application 56
in a batch 510
prompting for user input 513
reptlist.p procedure 23
RO-ERROR-CODE file entry 212
Index5
Security
_rbpwenc.p procedure 29
Startup parameters 48
startup.pf file 48
Statements
OS-COMMAND 416
Status
Report Status file
See Report status file
Syntax notation xi
Tables
Report Engine
See Report Engine tables
Test patterns
printing 320
Typographical conventions x
U
UDF Code Page In (-rbcpudfin)
startup parameter 410
User-defined parameters 326
User-defined Report Engine
parameters 320, 323
Index6