Jump to content

adding columns programatically


black_lotus

Recommended Posts

I have a report with several parameters and static fields. There is also a tabular section with a varying number of columns and rows. I will only know at run-time how many columns there are and so they need to be added to report programatically I guess. They will be added to the detail section. How do I add them programatically though? I've seen samples on how to do it when the whole report has no xml template, but I am using iReport to create a template. Can I get a JasperDesign object from a template or something similar? Or do I need to insert a subreport which will be created programatically and then inserted into the template?

Thanks

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I've read through the iReport manual concerning crosstabs, but I'm still not sure how to achieve what I need. Basically I have an array of javabeans with fields like age, year, amount. There is also a field which is an array of doubles. This field varies in size. It generally has between 1-3 values. So I need to display all of the content in these beans in a table. It would look something like below.

Can you provide a description on how to accomplish this please? Thanks!

Code:



Post Edited by some_one at 05/21/2009 14:14



Post Edited by some_one at 05/21/2009 14:15
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...