Running Total Problem

Posted on 2008-10-28
Last Modified: 2011-10-19
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;

Thank you for your help with this.

Question by:SAW56
  • 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;
LVL 77

Expert Comment

ID: 22819963
Add a first line of:


to both formulas.

(I assume by 'subtotal header' you mean 'Group Header')

Author Comment

ID: 22829397
For some reason it is not working.  It is still showing a running total.
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.
LVL 100

Accepted Solution

mlmcc earned 500 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.


Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
A short film showing how OnPage and Connectwise integration works.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now