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)
Creating custom output format
juhi
Hi,
My requirement from birt is that i generate and run the report using the birt apis and report designer, but i need to embbed the report data in my own web application and don't want to create a separate document(PDF, HTML, CSV etc).
Can i do it using birt? If yes, How?
Can i get the data from the dataset and store in in form of objects or get a cursor/iterator over the data?
Or any other approach is possible?
Please help.
Thanks,
Juhi.
Find more posts tagged with
Comments
johnw
Yes. There are a couple of options. When integrating using the Report Engine API, you can use what they call a Data Extraction Task to retrieve the data after report execution. This has the advantage of including the results of any aggregations or custom calculations you would have in your report. This will allow you to iterate over the results of tables in your report. You would need to iterate over each table separately.
The other option is to create a custom emitter that outputs to a data format that your application understands. You can use my DIV emitter in the DevShare as a starting point, and modify it to create XML. From there you could use the XML structure in your application, run it through XSLT, or whatever you wanted. The key here is to set the output stream in the RenderOption class to either a ByteArrayOutputStream or something in memory you could read from to create the XML DOM/SAX/JAX or whatever.