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

Question for Giulio Toffoli on SUBDATASETS


rubedogg04

Recommended Posts

I baught your book "The Definitive Guide to iReport" and must say I like it very much.

 

I am haveing one problem though. I referenced chpt 14 "Subdatasets". Basically, the graph portion looks great; however the text and fields portion doesnt. I set up 3 columns for my main dataset (3 txt fields, 3 respective data fields)

Your book only shows an example for on column and one record.

 

I followed your instructions and for some reason it does not work for a dataset that contains 3 columns with 4 rows. The data does appear, but in 4 pages. When i select to ignore pagination, it then shows 4 graphs with one row of data next to each.

 

What am i missing here? How do i get this to work using a subdataset?

 

please help.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi rubedogg04,

 

let me understand. You want to print a chart, and on the left of the chart you want to display the values exposed in the chart.

 

Subdatasets are used only to feed charts or a crosstabs. The rest of the report, band and elements (textfields, images, etc...) are printed accordingly to the main dataset.

 

To obtain what you want, you need to use a subreport. In effects a subreport works more or less like a subdataset (having his own query or using a different datasource than the master report). In facts you could print in example a chart using a subreport without having to define a subdataset (the chart will use the subreport main dataset).

 

 

 

Returning to the sample, the chart will be produced using the main dataset (or a subdataset if it is better for you), and the table of the values will be generated using a subreport (with the same query or a new instance of the same datasource used by the chart's subdataset).

 

Hope this answer your question.

 

size=400]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/chart_and_table.png

 

Giulio

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