Solved

# Running Total Problem

Posted on 2008-10-28
Medium Priority
332 Views
I have a report where I am using the following formulas to create a subtotal but I am running into a problem with it creating a running total instead of a total per group.  Can you please provide me with a solution? I have attached a screenshot of what is happening.

The Subtotal Header formula I am using is as follows:

shared numberVar DeptInformationCount;
DeptInformationCount := 0;

and the Subtotal Footer formula I am using is:

shared numberVar DeptInformationCount;
DeptInformationCount

Thank you for your help with this.

Running-Total-problem.bmp
0
Question by:SAW56
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2
• 2

Author Comment

ID: 22819943
Not sure if you need this information but this is the formula I used to originally gather the detailed information data:

shared numberVar InformationCount;
shared numberVar DeptInformationCount;
if {PROBSUMMARYM1.CATEGORY} = "information" then
(InformationCount := InformationCount + 1;
DeptInformationCount:= DeptInformationCount+ 1;
True;)
Else
False;
0

LVL 77

Expert Comment

ID: 22819963

WhilePrintingRecords;

to both formulas.

0

Author Comment

ID: 22829397
For some reason it is not working.  It is still showing a running total.
0

LVL 77

Expert Comment

ID: 22829934
I need more info about the report structure.  There must be (at least) two grouping levels so I need to see where everything is happening.
Can you post a sample report if possible or else post a bitmap of the design view.
0

LVL 101

Accepted Solution

mlmcc earned 2000 total points
ID: 22837952
Agree.  We need to know where each formula is.

The WhilePrintingRecords; isn't needed because shared variables are only processed in the printing pass.

You need a formula to reset InformationCount to 0.

It should be in the other group header.

mlmcc
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
###### Suggested Courses
Course of the Month9 days, 1 hour left to enroll