Did this article resolve your question/issue?



HOW to use RB-DB-CONNECTION parameter?


TitleHOW to use RB-DB-CONNECTION parameter?
URL Namehow-to-use-rb-db-connection-parameter
Article Number000114930
EnvironmentProduct: Progress
Version: 8.x, 9.x
Product: OpenEdge
Version: All Supported Versions
Question/Problem Description

The RB-DB-CONNECTION parameter (RB Report Engine) allows overriding the database connection parameters for database connections that are used in Report Builder reports.  It is particularly useful over time when the machine or port the database is running on has changed.
Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number

RB-DB-CONNECTION allows overriding of the saved database connections by specifying the logical name of the database as saved in the report, and all connection parameters the Report Engine needs in order to connect to the database containing the report data.  The connection string can be composed of any valid Progress client/db connection parameters.

Report Builder saves all required database connection information with the report definition (except for the password). Specify a value for RB-DB-CONNECTION one of the following three situations:
  1. Running a report using a database other than the one saved with the report definition
  2. Running 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)
  3. If the database requires a password, and you do not want Report Engine to prompt 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 there are security measures such as passwords and user IDs enabled, specify the Password (-P) and User ID (-U) parameters (or the Report Password (-rbP) parameter when using the table interface).

RB-DB-CONNECTION and the Report Engine's PRINTRB and PRNTRB2 Interfaces:
When using the PRINTRB(a.k.a. _printrb.p) or PRNTRB2(a.k.a. _prntrb2.p) interfaces to the Report Engine, the RB-DB-CONNECTION parameter allows overriding only one database.

In versions of Report Builder before 8.0, the parameters in the RB-DB-CONNECTION parameter to PRINTRB do not completely substitute for the full database connection string in the report definition. Instead, Report Engine substitutes them on a connection-parameter-by-connection-parameter basis.

Thus, if your report definition specifies the connection information "-db orders -N tcp -H server -S ordersrvc", and the RB-DB-CONNECTION parameter specifies the string "-H newserver", Report Engine uses the connection string "-db orders -N tcp -H newserver -S ordersrvc" when it attempts to establish the database connection.

Therefore, it unintentionally prevents overriding the previously described report database connection with a new connection string such as "-db c:\mydata\orders -1", because there is no way to eliminate the -H, -S, and -N connection parameters.

Because some users might have utilized this behavior, Report Builder Version 8.0 and greater retains it. However, Report Builder also augments the syntax of the RB-DB-CONNECTION parameter to allow completely replacing the report database connection information.

For example:
If the RB-DB-CONNECTION parameter contains "orders=-db c:\mydata\orders -1", where the leading "orders=" indicates the logical name of the database as specified in the report definition, the Report Engine discards all the connection information saved in the report definition and uses only the newly specified database connection parameters.

With the PRINTRB or PRNTRB2 interfaces, the "=>" symbol is not valid. Instead one must use the "=" symbol. The "=" symbol indicates to establish a new database connection using the specified connection information. When using the "=" symbol to specify the database connection information, follow these rules:
  • On the left side of the "=" symbol, specify the logical name of the database saved with the report.
  • On the right side of the "=" symbol, specify a complete connection string.
For example, if the report definition specifies the physical database as newdb1.db and the logical database name as newdb1, use the RB-DB-CONNECTION parameter to override the connection information using: newdb1 = -db newdb3 -1

This value means that when invoking 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, it is still possible to 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.
Last Modified Date8/24/2017 7:22 PM
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.