Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# Running Total in Crystal Reports

Posted on 2013-11-08
Medium Priority
459 Views
GH1... \$1,000.00

Detail      RunningTotal
-100             900
-90               810
-80               730
-85               645
-75               570

Need a running total to reset, but have a column next to the Detail...I made my example  "RunningTotal"
0
Question by:Mikeyman_01
[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

LVL 101

Expert Comment

ID: 39634864
WHen do you want it to reset?

When you say reset do you mean initialize to 1000?
If so, you can't use a running total.

Use 2 formulas

``````WhilePrintingRecords;
GLobal NumberVar myTotal;
myTotal := {SOmeField};
``````

IN the detail section to calculate and display
``````WhilePrintingRecords;
GLobal NumberVar myTotal;
myTotal := myTotal + {DetailField}
``````

mlmcc
0

LVL 35

Expert Comment

ID: 39635590
I assume that the figure in GH1 is from a field?

You could use a running total, but you would need a formula too.

Create a running total on the Detail column, set to reset for each group 1 (or wherever).

Create a formula like the following and put it next to the Detail field:

{GH1 field} + {#running total}

James
0

Author Comment

ID: 39637827
I need the details to reset based on the GroupHeader...The Value in the Group Header could is a Number (not a summary)
0

LVL 101

Accepted Solution

mlmcc earned 1000 total points
ID: 39638836
CHange my first  formula to set the value.

WhilePrintingRecords;
GLobal NumberVar myTotal;
myTotal :=  1000;

mlmcc
0

LVL 35

Assisted Solution

James0628 earned 1000 total points
ID: 39641195
Is the value in the group header in every record, or just the first one for each group?

If it's in every record, then, like I said, you could have a running total on your "Detail" field and have it reset when the group changes, and then create a formula that subtracts the running total from the field that you're displaying in the group header.

mlmcc's suggestion will work too, of course.  This is just another way you could handle it.

James
0

## Featured Post

Question has a verified solution.

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

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…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
###### Suggested Courses
Course of the Month10 days, 7 hours left to enroll