Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Dynamic BIRT report not populating xml data (Using Oda datasource which is not populating dynamic attributes of template.)
Dynamic BIRT report not populating xml data [message #1067810] Wed, 10 July 2013 16:34 Go to next message
Gaurav Vishwanath is currently offline Gaurav VishwanathFriend
Messages: 1
Registered: July 2013
Junior Member

We are using BIRT 3.7 api to generate dynamic PDF. We are setting up XML data source
using below logic. In below snippet we provides XML string as data source.
Strangely, since last week dynamic data is not getting populated from xml. It is not throwing any exception as such even in the FINEST log level.
As we have not updated any jars so not able to figure out the changes which made this functionality to break. PDF are getting generated without dynamic values.

Is there something else I can try out to set xml data source in java to birt template.

String paramStr = readFileAsString(servletContext.getRealPath("/WEB-INF/classes")
+ "/resources/test.xml");

FileInputStream fis = new FileInputStream(servletContext.getRealPath("/WEB-INF/classes")
+ "/resources/BirtXmlDataTest.rptdesign");
IReportRunnable design = birtReportEngine.openReportDesign(fis);
DesignElementHandle designElementHandle = design.getDesignHandle();
ModuleHandle moduleHandle = designElementHandle.getModuleHandle();
ElementFactory designElementFactory = designElementHandle.getElementFactory();
OdaDataSourceHandle dataSourceHandle = designElementFactory.newOdaDataSource("Data Source",


IRunAndRenderTask task = birtReportEngine
PDFRenderOption options = new PDFRenderOption();
// options.setOutputStream(response.getOutputStream());
File file = new File("d:\\test" + File.separator + "file2.pdf");
FileOutputStream fos = new FileOutputStream(file);
// options.setOutputStream(response.getOutputStream());

HashMap<String, Object> contextMap = new HashMap<String, Object>();
new ByteArrayInputStream(paramStr.getBytes()));
Re: Dynamic BIRT report not populating xml data [message #1068052 is a reply to message #1067810] Thu, 11 July 2013 20:18 Go to previous message
Kristopher Clark is currently offline Kristopher ClarkFriend
Messages: 130
Registered: January 2013
Senior Member
Could you run this with eclipsec.exe and see if it's throwing any errors in the console?
Previous Topic:BIRT software download problem
Next Topic:Chart: howto show "Percentile Value Data" as Tooltip (on mouseover)
Goto Forum:

Current Time: Sun Dec 15 16:18:50 GMT 2019

Powered by FUDForum. Page generated in 0.02118 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top