[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [birt-report-designer-dev] OdaDataSetHandle ref forexisting.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@xxxxxxxxxxx
[mailto:birt-report-designer-dev-bounces@xxxxxxxxxxx] On Behalf Of Tom
Corcoran
Sent: Friday, May 30, 2008 7:52 AM
To: birt-report-designer-dev@xxxxxxxxxxx
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.