Jump to content
We've recently updated our Privacy Statement, available here ×

How to use a Dataset or Report's query twice for a chart and a table - second is always empty


kcd

Recommended Posts

I'm trying to work out how best to do reports with a chart then a table representing the same dataset. I need to overcome the positioning of the summary is at the bottom, so intend to use subreports and table-subreports. I am experimenting with two tables and a chart in one detail band.
 
If I set the datasourceexpression for to $P{REPORT_DATA_SOURCE} only the chart displays data (presumably the first subreport type item) and the tables are empty. Seems the data can be consumed only once? Can I reset the increment?
 
If I use a Dataset to query the database it works however it executes the Query three times, once for each table/chart. That will be a massive overhead.
 
Obviously I am not doing this right but I cannot find any examples of using the same dataset more than once.
 
XML code snippets from iReport below. I tried to trim out the irrelevant parts.
Code:


Post Edited by kcd at 09/29/2011 02:48
Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 years later...
  • 4 years later...

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