Jump to content

How to summarize all groups then display group details


Ullauri.Byron

Recommended Posts

Say I have 4 Accounts that are grouped by account number, I would like the following where the summary would be a total balance

Accounts Summary Header

  • Summary of Account A
  • Summary of Account B
  • Summary of Account C
  • Summary of Account D

Accounts Summary Footer

 

Account A Details Header

Account A Details...

Account A Details Footer

 

Account B Details Header

Account B Details...

Account B Details Footer

 

Account C Details Header

Account C Details...

Account C Details Footer

 

Account D Details Header

Account D Details...

Account D Details Footer


The report I am using now groups them by account number but is repeating in the following way:

Summary of Account A

Account A Details

Summary of Account B

Account B Details

...etc

I have thought of considering a subreport for the summary section but it would end up being the same query used for the details section which would make it redundant.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I would say try to create one dummy group which should be the first group in order. Then you create all four groups for you A, B, C, and D accounts. You summarize data of all four groups into dummy group header section. And summarize data of each individual groups (A, B etc.) in their respecive group header and footer sections. 

Link to comment
Share on other sites

Are you suggesting I create n number of groups based on n number of accounts? If that's the case then it would be a problem because I don't know the number of accounts beforehand. I used 4 accounts as an example (A,B,C,D) but it could be more or less.

Also, in this multiple group scenario, I would be grouping by the same column...Don't think this presents a problem but just wanted to be clear on that.


My solution for it so far has been creating a subreport that uses the same JDBC connection, but it repeats the query and handles the summary grouping there. I feel like this is a redundant approach and have been trying to see if I can reuse the resultset from the master report in the subreport to avoid the repeated query.

I placed the subreport in the title of the master and it comes out how I want it,

Summary of account A

Summary of account B

... Summary of account n

Account A Details 

Account B Details

....Account n Details

though I am still looking for a better approach.

Link to comment
Share on other sites

I meant you create one dummy group, or master group in report with something like "1" as value in it. Then you create one more group on ACCOUNTS field that contains A, B, C, D, and so on values. 

Dummy Group Header  (GROUP#1)

  • Summary of Account A  - variables that would sum data and reset on group#1 level
  • Summary of Account B
  • Summary of Account C
  • Summary of Account D

Dummy Group Footer (suppress)

Account A Details Header (GROUP#2) 

Account A Details...

Account A Details Footer 

Account B Details Header

Account B Details...

Account B Details Footer

 

Account C Details Header

Account C Details...

Account C Details Footer

 

Account D Details Header

Account D Details...

Account D Details Footer

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