Jump to content
JasperReports Library 7.0 is now available ×

veloctiy/jrxml or JasperDesign approach


avi129

Recommended Posts

Hi,

There is a requirement in our project that .jrxml needs to be modifed dynamically (e.g. number of columns to be displayed and the sequence in which those will be displayed will change as per user selection and some other changes in the .jrxml).

I am thinking about two approaches.

1] Using Velocity to dynamically generate .jrxml

2] Prepare the basic .jrxml. Obtain the JasperDesign object from it and change it accordingly.

I want to know which approach will be better if we apply parameters as

 

performance,

coding complexity,

which one is the standard way ?

 

Or is there any other standard way to do this ?

 

 

Thanks in advance.

- Avinash

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Not too long ago I was faced with a similar challenge. I found out that, although possible, moving around objects in a JasperDesign can be very tricky, since, for instance, moving an object down will cause it to overlap other object. In essence when you move one object down you would need to move all other object below it as well (and if you run out of real state here then you just got yourself a hot potato in bare hands).

 

If at all possible, I think the velocity option could be better, since you no longer have to be concerned about the layout of the page (at least not that much anyways) but just the order where the elements of the page need to be. In my case we found a way to redesign the reports so that this solution was no longer needed (and yeah, I not a big fan of velocity)...

 

Hope this helps,

Roger

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...