Making a running text summary across groups in report (1 Viewer)

acclb

New member
Local time
Today, 09:03
Joined
Nov 12, 2023
Messages
5
Hi, I have a report that generates the sum of payments of every quarter. I added another running sum field in the group footer to calculate the running sum for the current group and the previous groups and it is working great. What I need to add is a text in the group footer to say which quarters are summed in this group. For example, the first group: Sum of First Quarter. The second group: Sum of First Quarter and Second Quarter…etc. I tried to use Sum with running total “over group” and “All” for a text but didn’t work. Can anyone help please?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:03
Joined
Feb 19, 2002
Messages
43,275
Why does the first group have one quarter and the second group have two quarters?
 

acclb

New member
Local time
Today, 09:03
Joined
Nov 12, 2023
Messages
5
The second group has the sum for the second quarter it self and another sum for quarter one plus quarter two. The third group also has the sum of the third group and a sum for quarter one plus quarter two plus quarter three ...etc. Sometime there are no records for a quarter so there will be no group for it then the next group will show it's own sum and the sum of the previous group like quarter 1 + quarter 3.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 02:03
Joined
Feb 19, 2002
Messages
43,275
This is called a running sum.

Add a control to hold the value. then on the data tab of the control properties set the RunningSum property to Over Group or Over All depending on how you are doing grouping.
 

acclb

New member
Local time
Today, 09:03
Joined
Nov 12, 2023
Messages
5
Thank you for your reply but this is not what I want. I already have the running sum working perfectly. What I need is to add a text next to the running sum that say: "Sum of quarter 1 and quarter 2", in the next group say "Sum of quarter1, quarter 2 and quarter 3" and same for the forth group "Sum of quarter1, quarter 2, quarter 3 and quarter 4". Sometimes we don't have a quarter 2 or 3 so the text should be adjusted accordingly. That's why I called it "Running Text" :)
 

acclb

New member
Local time
Today, 09:03
Joined
Nov 12, 2023
Messages
5
I'm thinking to use a variable to hold the name of each quarter then place it in the next group text box. Will try and reply back.
 

acclb

New member
Local time
Today, 09:03
Joined
Nov 12, 2023
Messages
5
It worked. Use a private variable to get the name of quarter in every instance (RunningSumLabel=RunningSumLabel + CurrentQuarterLabel) then use it in the group footer.
 

Users who are viewing this thread

Top Bottom