• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Jasper reports - Group several subreports

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a report with 3 subreports. I have a List for the main report, and one List for each of the 3 subreports. The list of my main reports is just a list of years, eg: 2010, 2011, 2012, 2013...

So far so good. The problem is that I'm not finding the right way to group them.

I need to group them in a way that each subreport shows the data relative to the year in question in the main report. It has to go like this:


--> 2010
- Report 1, with 2010 data
- Report 2, with 2010 data
- Report 3, with 2010 data


--> 2011
- Report 1, with 2011 data
- Report 2, with 2011 data
- Report 3, with 2011 data



The problem is, when I put a group in the main report, it does not group the subreports. I set a parameter in the subreport (the year), coming out of the main report. I checked, and the parameter gets to the subreport ok, but the group doesn't work. It only groups the main report, and the subreports get all messy. It is showing like this:


--> 2010
- Report 1, with data from all years
- Report 2, with data from all years
- Report 3, with data from all years

--> 2011
- Report 1, with no data
- Report 2, with no data
- Report 3, with no data



It also doesn't work when I group inside the subreport.... it makes it go like this:

--> 2010
- Report 1 with data from 2010
- Report 1 with data from 2011
- Report 2 with data from 2010
- Report 2 with data from 2011
- Report 3 with data from 2010
- Report 3 with data from 2011

--> 2011
- Report 1 with no data
- Report 1 with no data
- Report 2 with no data
- Report 2 with no data
- Report 3 with no data
- Report 3 with no data



I'm starting to think I'm gonna have to chance the whole structure to make it work. And I don't even know what I'm gonna change it to.


How can I do what I want?

Thanks in advance
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic