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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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 …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

747 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

12 Experts available now in Live!

Get 1:1 Help Now