Jump to content

Recommended Posts

Posted

I have an XML datasource that I want to use to generate parameters... however, this datasource isn't in a file, it's in the "Parameter" column of the ReportCriteria table of the database that is currently the active JDBC connection.

 

 

Is there a way to get iReport to somehow parse this data without re-writing my code to create a new XML file every time the report is run?

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted

I think you would have to do some sort of strange join to that table and get it included as part of your report query. Perhaps you could have all your reports be subreports and the outer report performs the query to get your settings. Either way seems like a jury-rigged solution.

 

Most likely, your needs will be best met by building your own datasource before you fill the report. You could write a servlet (or whatever paradigm is appropriate for your environment) that queries the database twice, builds a single XML datasource (in memory, no need to spool to disk) and passes that to JasperFillManager as its datasource.

 

Best of luck.

 

Kind regards,

Justis

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...