Solved

Running Total in Crystal Reports

Posted on 2013-11-08
5
443 Views
Last Modified: 2013-11-13
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
Comment
Question by:Mikeyman_01
  • 2
  • 2
5 Comments
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
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

IN group header
WhilePrintingRecords;
GLobal NumberVar myTotal;
myTotal := {SOmeField};

Open in new window


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

Open in new window


mlmcc
0
 
LVL 34

Expert Comment

by:James0628
Comment Utility
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

by:Mikeyman_01
Comment Utility
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 100

Accepted Solution

by:
mlmcc earned 250 total points
Comment Utility
CHange my first  formula to set the value.

WhilePrintingRecords;
GLobal NumberVar myTotal;
myTotal :=  1000;

mlmcc
0
 
LVL 34

Assisted Solution

by:James0628
James0628 earned 250 total points
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

6 Experts available now in Live!

Get 1:1 Help Now