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:
- Running a report using a database other than the one saved with the report definition
- 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)
- 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.
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.