We have created Birt reports in eclips Report design and we use Birt jdbc Data source to connect to a derby database. Now we will use the same reports with mysql database. Each time we need to edit this datasource in each report. We would like to have a property in java/maven where we could change the Driver Class and Database URL.
We already followed the instructions on this link How to set a datasource for a BIRT report programmatically?
But here he will use dynamic database url at runtime. But don't want this at runtime, it has to change permanent until we change it again trough maven.
We found a solution to do this. In birt report we use jdbc data source (property binding):
so we created a parameter where we can select derby or mysql at runtime.
We use also report web viewer, so we show this report in a webpage :
Now we pas the parameter in this viewer like this:
the parameter value will automatically change by using maven profiles.