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

variable that is a collection or map


ge0ffrey

Recommended Posts

Let's say I have this resultset as a datasource:

A-1 B-1 1
A-1 B-2 20
A-2 B-1 300
A-2 B-2 400

and I want this report:

Total   4321
* B-1 301
* B-2 4020
A-1 * 21
A-1 B-1 1
A-1 B-2 20
A-2 * 4300
A-2 B-1 300
A-2 B-2 400

How can I do that?

I can create a <variable> grandTotal for the total, that is easy.

I can create a <group> for the A's and a <variable> groupATotal (for line A-1/* and A-2/*)

I can show these lines directly: A-1/B-1, A-1/B-2, A-2/B-1, A-2/B-2

But how do I show the lines */B-1 and */B-2? Is there some way to create a variable that is a list or map itself?

Making a subreport for those is not really valid option, because in reality this nesting goes up to A's holds B's holds C's hold D's and there are many of each of those. A subreport would create a lot n+1 query problems.

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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