views:

370

answers:

2

Hi

I have a requirement to develop custom reports where we already have some reoprts developed using JasperReports using iReport tool. Now the requirement is to modify those reports design at run time. I should use those existing jrxml files and save as to new report then change the design at run time. Also I should see those newly created reports whenever I want.

I have gone through the Jasper API and Dynamic Reports where we can create the reports dynamically at run time but we can't save the design (like JRXML).

I am looking for any other JRXML design API to create and modify and save the Jasper Reports at run time.

I appreciate if any one can help me.

Thanks in Advance Srinivas

A: 

First thing you will need to draw a flow chart of how you want to do things.

For example, if the report already exists, and you want it as is, what will you do? In case you want to modify it a little, do you want to save as jrxml and compile each time? Or do you want to compile to jasper, store on local storage then populate later.

It seems you want to build a reporting engine and answering all those questions is basic. In that case here is something to start from. Find a factory called DocumentBuilderFactory which will help you parse the XML into DOM object, modify then save it.

Here is a good tutorial on using it

medopal
Hi Medopal,Thank you very much for your answerAs you mentioned in the 2 point that it will similar like reporting engine because I need to create another JRXML based on my old jrxml at run time and modify then save. I need to show all the reports (modified and original) on screen to user then he can export when ever they want. You said DocumentBuilderFactory from DOM. Do you any other API (May be from Jasper) to create and modfiy jrxml at run time? I found some JRXMLWriter and JRXMLReader but I don't whether these works for me or not.Please help me if you know anything
Srinivas
A: 

It seems DynamicJasper can do this.

Bozho