Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing a Summary Section that has its own details

Status
Not open for further replies.

signup4deals

IS-IT--Management
Dec 17, 2020
2
US
Hello,

I am stuck trying the calculate and print the summary column of a report as shown below.
The report has customer data for each month - but the summary data needs to be calculated in crystal.
The report output will look as under.

Customer 1
Jan-2020 $100​
Feb-2020 $200​
Mar-2020 $300​
Customer 2
Jan-2020 $100​
Feb-2020 $200​
Mar-2020 $300​
Customer 3
Jan-2020 $100​
Feb-2020 $200​
Mar-2020 $300​
Summary for all Customers
Jan-2020 $300​
Feb-2020 $600​
Mar-2020 $900​

Q1. How do I calculate and print the summary column in the crystal report.
Since that summary column has its own details (variable number of months) - do I create a new details section -
How do I show that details on the last page

Q2. How to calculate the Sum for each month for all customers
Can this be done via running totals or do I need to write a custom formula
 
How I would do it. Group by Customer and Date. Make a running total that resets on the Date group.

Then you could create another running total that would reset on the Customer group.

In both cases, the running total would go in the GF of their respective group and the details would be hidden.

Of course I am speculating a bit since I do not know how raw data looks like.
 
Just for reference the raw data looks like this

Customer 1, Jan-2020, 100
Customer 1, Feb-2020, 200
Customer 1, Mar-2020, 300
Customer 2, Jan-2020, 100
Customer 2, Feb-2020, 200
Customer 2, Mar-2020, 300
Customer 3, Jan-2020, 100
Customer 3, Feb-2020, 200
Customer 3, Mar-2020, 300

Also, I have created the 2 running totals - one that resets at Date and one that resets at Customer.
But those groups engulf the details section.
What I need is that the running totals show as another details section - summed up by date
 
If your data is really that simple, you could insert a crosstab (insert->crosstab) in the report header or report footer, and then add Customer and Month as the two row fields, and sum of amount as the summary field.

If you want to show detail somewhere in the report, you could also accomplish that with a separate crosstab that adds in an ID field at the detail level, e.g., product ID. Or, you could just insert groups as Kray suggested, and place the desired details in the detail section.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top