Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Integrating BIRT with my web app and generating PDFs
GREG1007
Hello,
I'm new to Birt and I would like to create web application (Spring MVC) which should be able to generate PDF files using BIRT.
I created simple report using Birt that generate PDF files. Data source comes from XML file. So now I have a question: is there possibility to send XML data set to servlet, and then to create PDFs based on this data set using previously created Birt report (.rtpdesign)?
I would be grateful for any help and tips.
Find more posts tagged with
Comments
JasonW
Sure. When you use the RE API you can get the appcontext and set the xml input stream like:
task.getAppContext().put("org.eclipse.datatools.enablement.oda.xml.inputStream", bais);
where bais is an input stream. I am attaching a report that sets the stream in script. Not the same thing you want but should give you the idea. In your case you should be able to just add the line above to the RE API code.
BTW you may also want to take a look at this article:
http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT
Jason
megamadhu
<blockquote class='ipsBlockquote' data-author="'JasonW'" data-cid="103206" data-time="1339702203" data-date="14 June 2012 - 12:30 PM"><p>
Sure. When you use the RE API you can get the appcontext and set the xml input stream like:<br />
<br />
task.getAppContext().put("org.eclipse.datatools.enablement.oda.xml.inputStream", bais);<br />
where bais is an input stream. I am attaching a report that sets the stream in script. Not the same thing you want but should give you the idea. In your case you should be able to just add the line above to the RE API code.<br />
<br />
BTW you may also want to take a look at this article:<br />
<a class='bbc_url' href='
http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT'>http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT</a><br
/>
<br />
Jason<br /></p></blockquote>
<br />
<br />
<br />
<br />
//////////////////////////////////////////////////////////////////////////////////////////////<br />
<br />
Hello,<br />
<br />
I want to retrieve data from database(mysql)and based on that data i want to generate BIRT report using Spring MVC.<br />
<br />
I have already designed the report..but how can I integrate it in Spring..<br />
<br />
My report file is attached below<br />
<br />
Please help me.<br />
Thanks
johnw
The above link from Jasons reply explains how to set up the Spring Beans for handling report requests, and how to create a View for BIRT reports. Read the article.