|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
OdaDataSetHandle ref for existing .rptdesign templateStarting with a .rptdesign template I am looking to manipulate this at runtime to run against a number of databases.
http://dev.eclipse.org/newslists/news.eclipse.birt/msg20490.html outlines doing OdaDataSetHandle dsHandle = designFactory.newOdaDataSet( "ds", "org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" ); I could then point odaURL to the new database, using: dsHandle.setProperty( "odaURL", "jdbc:classicmodels:sampledb" ); My question is how can I get an instance of OdaDataSetHandle for existing .rptdesign rather than create a new one? |
|
|
RE: OdaDataSetHandle ref for existing.rptdesign templateReportDesignHandle.findDataSet(datasetname);
Or you can get the dataset list: ReportDesignHandle.getDataSets(); Thanks! -----Original Message----- From: birt-report-designer-dev-bounces@... [mailto:birt-report-designer-dev-bounces@...] On Behalf Of Tom Corcoran Sent: Thursday, May 29, 2008 4:22 PM To: birt-report-designer-dev@... Subject: [birt-report-designer-dev] OdaDataSetHandle ref for existing.rptdesign template Starting with a .rptdesign template I am looking to manipulate this at runtime to run against a number of databases. http://dev.eclipse.org/newslists/news.eclipse.birt/msg20490.html outlines doing OdaDataSetHandle dsHandle = designFactory.newOdaDataSet( "ds", "org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" ); I could then point odaURL to the new database, using: dsHandle.setProperty( "odaURL", "jdbc:classicmodels:sampledb" ); My question is how can I get an instance of OdaDataSetHandle for existing .rptdesign rather than create a new one? -- View this message in context: http://www.nabble.com/OdaDataSetHandle-ref-for-existing-.rptdesign-templ ate-tp17517667p17517667.html Sent from the Eclipse BIRT - Report Designer - Dev mailing list archive at Nabble.com. _______________________________________________ birt-report-designer-dev mailing list birt-report-designer-dev@... https://dev.eclipse.org/mailman/listinfo/birt-report-designer-dev _______________________________________________ birt-report-designer-dev mailing list birt-report-designer-dev@... https://dev.eclipse.org/mailman/listinfo/birt-report-designer-dev |
|
|
RE: OdaDataSetHandle ref for existing.rptdesign templateThe BIRT apis do seem to have a big learning curve, It's frustrating that they are still being fundamentally changed it seem; we were disappointed to find after purchasing the 2 BIRT addison wesley books 2 weeks ago, the examples given around this functionality are already out of date with BIRT 2.2.
So now I have: EngineConfig config = new EngineConfig(); config.setBIRTHome("birt-runtime-2_2_2/ReportEngine"); Platform.startup(config); IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY) IReportEngine engine = factory.createReportEngine(config) IReportRunnable design = engine.openReportDesign('reports/myreport.rptdesign') ReportDesignHandle report = (ReportDesignHandle) design.getDesignHandle(); DataSourceHandle dso = report.findDataSet('TestSet') // your suggestion this gives: Unexpected exception: Cannot cast object 'org.eclipse.birt.report.model.api.OdaDataSetHandle@1108727' with class 'org.eclipse.birt.report.model.api.OdaDataSetHandle' to class 'org.eclipse.birt.report.model.api.DataSourceHandle Any help appreciated.
|
|
|
RE: OdaDataSetHandle ref forexisting.rptdesign templateAny BIRT API change we make sure we do take care of the
backward compatibility issue. For your code, I think maybe you should write: DataSetHandle dso =
report.findDataSet('TestSet') The OdaDataSetHandle cannot be casted to a DataSourceHandle. Thanks! -----Original Message----- The BIRT apis do seem to have a big learning curve, It's
frustrating that they are still being fundamentally changed it seem; we
were disappointed to find after purchasing the 2 BIRT addison wesley books 2
weeks ago, the examples given around this functionality are already out
of date with BIRT 2.2. So now I have: EngineConfig config = new EngineConfig(); config.setBIRTHome("birt-runtime-2_2_2/ReportEngine");
Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY) IReportEngine engine = factory.createReportEngine(config) IReportRunnable design = engine.openReportDesign('reports/myreport.rptdesign')
ReportDesignHandle report = (ReportDesignHandle)
design.getDesignHandle(); DataSourceHandle dso = report.findDataSet('TestSet') //
your suggestion this gives: Unexpected exception: Cannot cast object 'org.eclipse.birt.report.model.api.OdaDataSetHandle@1108727'
with class 'org.eclipse.birt.report.model.api.OdaDataSetHandle' to
class 'org.eclipse.birt.report.model.api.DataSourceHandle Any help appreciated. Yu Li wrote: > > ReportDesignHandle.findDataSet(datasetname); > > Or you can get the dataset list: > ReportDesignHandle.getDataSets(); > > Thanks! > > -----Original Message----- > From: birt-report-designer-dev-bounces@... >
[mailto:birt-report-designer-dev-bounces@...] On Behalf Of Tom > Corcoran > Sent: Thursday, May 29, 2008 4:22 PM > To: birt-report-designer-dev@... > Subject: [birt-report-designer-dev] OdaDataSetHandle
ref for > existing.rptdesign template > > > Starting with a .rptdesign template I am looking to
manipulate this at > runtime to run against a number of databases. > >
http://dev.eclipse.org/newslists/news.eclipse.birt/msg20490.html > outlines doing > OdaDataSetHandle dsHandle =
designFactory.newOdaDataSet( "ds", > >
"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" ); > I could then point odaURL to the new database,
using: > dsHandle.setProperty(
"odaURL", > "jdbc:classicmodels:sampledb" ); > > My question is how can I get an instance of
OdaDataSetHandle for > existing > .rptdesign rather than create a new one? > > -- > View this message in context: >
http://www.nabble.com/OdaDataSetHandle-ref-for-existing-.rptdesign-templ > ate-tp17517667p17517667.html > Sent from the Eclipse BIRT - Report Designer - Dev
mailing list archive > at Nabble.com. > > _______________________________________________ > birt-report-designer-dev mailing list > birt-report-designer-dev@... > https://dev.eclipse.org/mailman/listinfo/birt-report-designer-dev > _______________________________________________ > birt-report-designer-dev mailing list > birt-report-designer-dev@... >
https://dev.eclipse.org/mailman/listinfo/birt-report-designer-dev > > -- View this message in context:
http://www.nabble.com/OdaDataSetHandle-ref-for-existing-.rptdesign-template-tp17517667p17557564.html Sent from the Eclipse BIRT - Report Designer - Dev
mailing list archive at Nabble.com. _______________________________________________ birt-report-designer-dev mailing list https://dev.eclipse.org/mailman/listinfo/birt-report-designer-dev _______________________________________________ birt-report-designer-dev mailing list birt-report-designer-dev@... https://dev.eclipse.org/mailman/listinfo/birt-report-designer-dev |
|
|
RE: OdaDataSetHandle ref forexisting.rptdesign templateDoh. I guess it was a long day! Grrrr I never spotted that. Thanks :-)
|
|
|
RE: OdaDataSetHandle refforexisting.rptdesign templateHow do I get off this mailing list?
-----Original Message----- From: birt-report-designer-dev-bounces@... [mailto:birt-report-designer-dev-bounces@...] On Behalf Of Tom Corcoran Sent: Tuesday, June 03, 2008 11:43 AM To: birt-report-designer-dev@... Subject: RE: [birt-report-designer-dev] OdaDataSetHandle refforexisting.rptdesign template Doh. I guess it was a long day! Grrrr I never spotted that. Thanks :-) Any BIRT API change we make sure we do take care of the backward compatibility issue. For your code, I think maybe you should write: DataSetHandle dso = report.findDataSet('TestSet') The OdaDataSetHandle cannot be casted to a DataSourceHandle. -----Original Message----- From: birt-report-designer-dev-bounces@... [mailto:birt-report-designer-dev-bounces@...] On Behalf Of Tom Corcoran Sent: Friday, May 30, 2008 7:52 AM To: birt-report-designer-dev@... Subject: RE: [birt-report-designer-dev] OdaDataSetHandle ref forexisting.rptdesign template EngineConfig config = new EngineConfig(); config.setBIRTHome("birt-runtime-2_2_2/ReportEngine"); Platform.startup(config); IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGIN E_FACTORY) IReportEngine engine = factory.createReportEngine(config) IReportRunnable design = engine.openReportDesign('reports/myreport.rptdesign') ReportDesignHandle report = (ReportDesignHandle) design.getDesignHandle(); DataSourceHandle dso = report.findDataSet('TestSet') // your suggestion this gives: Unexpected exception: Cannot cast object 'org.eclipse.birt.report.model.api.OdaDataSetHandle@1108727' with class 'org.eclipse.birt.report.model.api.OdaDataSetHandle' to class 'org.eclipse.birt.report.model.api.DataSourceHandle -- View this message in context: http://www.nabble.com/OdaDataSetHandle-ref-for-existing-.rptdesign-template- tp17517667p17618896.html Sent from the Eclipse BIRT - Report Designer - Dev mailing list archive at Nabble.com. _______________________________________________ birt-report-designer-dev mailing list birt-report-designer-dev@... https://dev.eclipse.org/mailman/listinfo/birt-report-designer-dev _______________________________________________ birt-report-designer-dev mailing list birt-report-designer-dev@... https://dev.eclipse.org/mailman/listinfo/birt-report-designer-dev |
| Free embeddable forum powered by Nabble | Forum Help |