tags:

views:

1376

answers:

2

I have multiple BIRT reports that obtains the data from the same jdbc data source.

Is it possible to obtain the conection parameters (Driver URL, User Name, and Password) from an external property file or similar?

A: 

One you create a functional data source, you can add that data source to a report library that can be imported and used by all BIRT reports in your system. The source inside the library can have static connection attributes, or you can abstract them using externalized properties.

If you want to externalize the connection info, you will need to tweak the Data source itself. Inside the Data Source Editor, there is a "Property Binding" section that allows you to abstract all the values governing the data connection. From there you can bind the values (using the expression editor) to either report parameters or a properties file.

To bind to a report parameter, use this syntax: params[paramertername].value as the expression.

To bind to a properties file, set the Resource file in the Report's top-level properties. From there you can just use the property key value to bind the entry to the Data Source.

Good Luck!

MystikSpiral
Thanks! That was helpful.I had to use in the property binding values the following line of code: reportContext.getMessage("propertyKey", reportContext.getLocale());
A: 

HI

can you tell me where can i see this IDE

"To bind to a properties file, set the Resource file in the Report's top-level properties. From there you can just use the property key value to bind the entry to the Data Source."

Thank you vijay

vijay kumar