Consultor Eletrônico



Kbase P52086: Report Builder: How to override a connection from one non-progress database to another
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/31/2010
Status: Verified

GOAL:

Report Builder: How to override a connection from one non-progress database to another

FACT(s) (Environment):

Windows
Progress 9.x

FIX:

If a Report Builder report was designed against a non-Progress database (using a DataServer) and the database connection stored in the report needs to be overridden by a connection to another non-Progress database, both the name of the schema holder and the non-Progress database must be overridden.

Since overriding multiple connections requires the use of the table interface, and the RBREPORT table cannot be in one of the schema holders, the following steps should be taken:

- Create a Progress database containing the RBREPORT table. (For example Runtable)

- When populating the RBREPORT table, specify both the overrides for the schema holder and the non-progress databases in the RB-DB-CONNECTION field, separated by a newline character ("~n")

- When invoking the Report Builder engine, specify the connection to the Progress database holding the RBREPORT table first, followed by the connection to the schema holder and non-progress databases.

For example, when invoking the Report Engine from 4GL, using the _prore.p interface the code should look something like

DO TRANSACTION:

CREATE RBREPORT.

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-DISPLAY-STATUS = yes
RBREPORT.RB-DISPLAY-ERRORS = yes
RBREPORT.RB-DB-CONNECTION = "holder1 => holder2~noracle1 => oracle2".
/* ^^^^^^^^^^ ^^ ^^^^^^^^^^
Override of schema holder --------------+ | |
Newline character to separate overrides -----------+ |
Override of non-progress database --------------------------+
*/
RELEASE RBREPORT.
END.


RUN aderb\_prore.p(false, "-pf runtable.pf -pf connect.pf").
/* ^ ^^^^^ ^^^^^
NO-WAIT option ----+ | |
Connection to database ---+ |
containing RBREPORT table |
Connection to schema holder and -------------+
non-progress database

Connection parameters are kept in .pf files for ease of maintenance.
*/