Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Running Total in Crystal Reports

Posted on 2013-11-08
5
Medium Priority
?
461 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 101

Expert Comment

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

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 35

Expert Comment

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

by:Mikeyman_01
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

by:
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

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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. …
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…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

971 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