-
I'm trying to upgrade from birt 4.8 to 4.9. I have a plugin.xml that customizes the driverClass for dataSource, but it doesn't work (it works at 4.8). Can someone help me confirm if this is a problem or if I need to adjust plugin.xml IReportRunnable iReportRunnable = context.getItem("report");
IRunAndRenderTask task = BirtEngine.getInstance().createIRunAndRenderTask(iReportRunnable);
Map<String, Object> parameters = context.getItem("BirtContext");
ByteArrayInputStream tInputStringStream = (ByteArrayInputStream) parameters.get(
org.eclipse.datatools.enablement.oda.xml.Constants.APPCONTEXT_INPUTSTREAM);
PDFRenderOption pdfRenderOption = new PDFRenderOption();
parameters.put(EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT, pdfRenderOption);
// DmsResourceIdentifiers extends org.eclipse.datatools.connectivity.oda.util.ResourceIdentifiers
parameters.put("org.eclipse.datatools.connectivity.oda.util_consumerResourceIds",
BirtEngine.getInstance().getDmsResourceIdentifiers());
task.setAppContext(parameters);
task.validateParameters();
pdfRenderOption.setOutputStream(byteArrayOutputStream);
pdfRenderOption.setOutputFormat("pdf");
task.setRenderOption(pdfRenderOption);
task.run(); class DmsDriver extends org.eclipse.datatools.enablement.oda.xml.impl.Driver {
@Override
public IConnection getConnection(String dataSourceId) {
return new DmsConnection();
}
}
class DmsConnection extends org.eclipse.datatools.enablement.oda.xml.impl.Connection {
@Override
public IQuery newQuery(String dataSetType) {
return new DmsQuery(this);
}
}
class DmsQuery implements org.eclipse.datatools.connectivity.oda.IQuery {
@Override
public void prepare(String queryText) {
}
} |
Beta Was this translation helpful? Give feedback.
Answered by
syc795
May 14, 2022
Replies: 1 comment
-
After debugging, I found a hot fix. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
syc795
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After debugging, I found a hot fix.
eclipse-platform/eclipse.platform.runtime@f3e3cbe