Ullauri.Byron Posted December 28, 2017 Share Posted December 28, 2017 Say I have 4 Accounts that are grouped by account number, I would like the following where the summary would be a total balanceAccounts Summary HeaderSummary of Account ASummary of Account BSummary of Account CSummary of Account DAccounts Summary Footer Account A Details HeaderAccount A Details...Account A Details Footer Account B Details HeaderAccount B Details...Account B Details Footer Account C Details HeaderAccount C Details...Account C Details Footer Account D Details HeaderAccount D Details...Account D Details FooterThe report I am using now groups them by account number but is repeating in the following way:Summary of Account AAccount A DetailsSummary of Account BAccount B Details...etcI 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 More sharing options...
Ullauri.Byron Posted December 28, 2017 Author Share Posted December 28, 2017 Link to comment Share on other sites More sharing options...
dprogrammer Posted December 29, 2017 Share Posted December 29, 2017 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 More sharing options...
Ullauri.Byron Posted December 29, 2017 Author Share Posted December 29, 2017 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 ASummary of account B... Summary of account nAccount A Details Account B Details....Account n Detailsthough I am still looking for a better approach. Link to comment Share on other sites More sharing options...
dprogrammer Posted December 29, 2017 Share Posted December 29, 2017 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 levelSummary of Account BSummary of Account CSummary of Account DDummy Group Footer (suppress)Account A Details Header (GROUP#2) Account A Details...Account A Details Footer Account B Details HeaderAccount B Details...Account B Details Footer Account C Details HeaderAccount C Details...Account C Details Footer Account D Details HeaderAccount D Details...Account D Details Footer Link to comment Share on other sites More sharing options...
Ullauri.Byron Posted December 29, 2017 Author Share Posted December 29, 2017 If place the account field in the dummy header only the first account number shows up. Tried using a variable too. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now