Changing the Data Source of a Crosstab [message #721123] |
Wed, 31 August 2011 23:03 |
Jeff Rasmussen Messages: 1 Registered: August 2011 |
Junior Member |
|
|
This is my first post so I'm going to apologize up front if this message does not conform to etiquette guidelines. If it does, perhaps someone can point me to the correct reference materials?
Now that that is out of the way, my issue, which seems to have not been asked this way is as follows:
the BIRT reports we deploy target many different environments each with their own data.
so, to facilitate this, prior to running any report, all data sources in the rptdesign are updated with the current system's connection information (url, user, pass, driverClass). This allows us to connect the report to the same data source as the rest of the application.
to do that we do this:
Iterator<OdaDataSourceHandle> dataSourceIter = designHandle.getDataSources().iterator();
while (dataSourceIter.hasNext()) {
OdaDataSourceHandle dataSourceHandle = dataSourceIter.next();
if (this.usePropertiesDatasource(dataSourceHandle)) {
dataSourceHandle.setPropertyBinding("odaDriverClass", enquote(getOdaDriverClass()));
dataSourceHandle.setPropertyBinding("odaURL", enquote(getOdaURL()));
dataSourceHandle.setPropertyBinding("odaUser", enquote(getOdaUser()));
dataSourceHandle.setPropertyBinding("odaPassword", enquote(getOdaPassword()));
}
}
The problem arises when we have a crosstab on the report. With or without the crosstab on the report, the property bindings appear to be reset correctly and the ones applied in the above method are used. However, when a crosstab is on the report, all tables and crosstabs ignore the changed datasource and instead, use the one that's previously included with the rptdesign even though all the properties should have already been updated.
Perhaps we're using the update wrong? This whole process works fine when there's only a table on the report.
Thanks for any and all ideas,
Jeff
|
|
|
Re: Changing the Data Source of a Crosstab [message #721466 is a reply to message #721123] |
Thu, 01 September 2011 19:18 |
Eric Rizzo Messages: 3070 Registered: July 2009 |
Senior Member |
|
|
BIRT has its own group in the forums, so you'll probably get more help
there as opposed to this "Newcomers" group.
Eric
On 8/31/11 7:03 PM, Jeff Rasmussen wrote:
> This is my first post so I'm going to apologize up front if this message
> does not conform to etiquette guidelines. If it does, perhaps someone
> can point me to the correct reference materials?
>
> Now that that is out of the way, my issue, which seems to have not been
> asked this way is as follows:
>
> the BIRT reports we deploy target many different environments each with
> their own data.
> so, to facilitate this, prior to running any report, all data sources in
> the rptdesign are updated with the current system's connection
> information (url, user, pass, driverClass). This allows us to connect
> the report to the same data source as the rest of the application.
>
>
> to do that we do this:
>
> Iterator<OdaDataSourceHandle> dataSourceIter =
> designHandle.getDataSources().iterator();
> while (dataSourceIter.hasNext()) {
> OdaDataSourceHandle dataSourceHandle = dataSourceIter.next();
> if (this.usePropertiesDatasource(dataSourceHandle)) {
> dataSourceHandle.setPropertyBinding("odaDriverClass",
> enquote(getOdaDriverClass()));
> dataSourceHandle.setPropertyBinding("odaURL", enquote(getOdaURL()));
> dataSourceHandle.setPropertyBinding("odaUser", enquote(getOdaUser()));
> dataSourceHandle.setPropertyBinding("odaPassword",
> enquote(getOdaPassword()));
> }
> }
>
> The problem arises when we have a crosstab on the report. With or
> without the crosstab on the report, the property bindings appear to be
> reset correctly and the ones applied in the above method are used.
> However, when a crosstab is on the report, all tables and crosstabs
> ignore the changed datasource and instead, use the one that's previously
> included with the rptdesign even though all the properties should have
> already been updated. Perhaps we're using the update wrong? This whole
> process works fine when there's only a table on the report.
> Thanks for any and all ideas,
> Jeff
|
|
|
Powered by
FUDForum. Page generated in 0.08568 seconds