How to use Running Total Fields in Crystal Report

No.of Views7750
Bookmarked0 times
Downloads 
Votes0
By  RRaveen   On  11 Dec 2010 06:12:11
Tag : Crystal Reports , General
In this article, I will explain how to create Running Total in crystal report for various circumstances. If you are work with financial application you may have to create summary report for transaction with subtotal, group by total, grand total and more.
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

In this article, I will explain how to create Running Total in crystal report for various circumstances. If you are work with financial application you may have to create summary report for transaction with subtotal, group by total, grand total and more.

I try to give in below article steps by steps process to perform to use the running total field.

Implementation

I have already design database and report. If you are aware of create report using crystal report read this article.

Note: I have ignored basic steps of create report on this article. I hope you are fine of design report using crystal report.

Step 1

Right click on Running Total Fields and select New.

Image Loading

Then a new window open with create running total options and selections. 

Image Loading

Now you have to decide how you are going to build running total as like below

1.    Running total for which column
2.    Group by Column
3.    How Running Total going to change

Step 2

Now you have to give name for running total, I have given Name SalaryTotal for this demonstration.

Image Loading

Step 3

This is important step, you have to select report field to Field to Summarize.i have selected MSalary  column for this demonstration to create running total.

Image Loading

Step 4

On this step you have to decide what type of summary going to build for running total. Use the Type of summary list to select from a number of summary options. The summary type you choose will determine the running total calculation. There are many types have selected Sum for this demonstration.
 

Image Loading

Step 5

On this step you have to select what type of Evaluate for running total, there are four options.

1.    For each record
2.    On change of field
3.    On change of group
4.    Use a formula

For each record

Use the For each record option to have your running total evaluate each record in a field.

On change of field

Use the On change of field option to have your running total perform its evaluation only when a specified field has changed.
Note: Use the Add button (>) to copy a field from the Available Tables and Fields list to the On change of field list.

On change of group

Use the On change of group option to have your running total perform its evaluation only when a specified group has changed.

Use a formula

Select the Use a formula option to have your running total use a formula when performing its calculations.

So I have selected for each record evaluate type option for this demonstration 

Image Loading

Step 6

This semi final step and important step to reset you’re running total values. There also four different options for Reset.

1.    Never
2.    On change of field
3.    On change of group
4.    Use a formula

Never

Use the Never option to lock your running total field. With the Never button selected, your running total will perform its calculations on that field throughout the entire report.

On Change of field

Use the On change of field list to have your running total evaluate or reset when a designated field changes.
Note: Use the Add button (>) to copy a field from the Available Tables and Fields list to the On change of field list.

On change of group

Use the On change of group list to have your running total evaluate or reset when a designated group changes.

Use a formula

Select the Use a formula option to have your running total use a formula to determine when to reset

For this demonstration I use Never option to reset. I’m going to calculate total of all employee salary for this report and going to add as footer.

Image Loading

Step 7

Once click ok button the field is ready use. Then drag and drop “SalaryTotal’ from Field explorer place in Report Footer and add a text Object “Grand Total” as like below. 

Image Loading

Step 8

The report design is complete press F5 to see preview. The report preview as like below, 

Image Loading

Conclusion

In this article, you have learned how to create Running Total in crystal report .hopes help and thank you for reading. if you have any questions regards, please post in messageboard.

 
Sign Up to vote for this article
 
About Author
 
RRaveen
Occupation-Software Engineer
Company-TGS
Member Type-Gold
Location-Singapore
Joined date-03 Jun 2009
Home Page-codegain.com
Blog Page-www.codegain.com
- B.Sc. degree in Computer Science. - 4+ years experience in Visual C#.net and VB.net - Obsessed in OOP style design and programming. - Designing and developing Network security tools. - Designing and developing a client/server application for sharing files among users in a way other than FTP protocol. - Designing and implementing GSM gateway applications and bulk messaging. - Windows Mobile and Symbian Programming - Having knowledge with ERP solutions
 
 
Other popularSectionarticles
Comments
By:Rumesh SrivastavDate Of Posted:3/15/2012 4:13:17 AM
Running total fields in crystal report
Check this links too its also having nice post with wonderful explanation on running total field in crystal report.... http://www.mindstick.com/Articles/d482235f-3777-44d6-9599-5b790444e851/?Running%20Total%20Field%20in%20Crystal%20Report http://msdn.microsoft.com/en-us/library/ms227866%28v=vs.90%29.aspx
By:RRaveenDate Of Posted:1/12/2011 9:26:48 AM
Solution
Hi, In this case, you have to substring hour and minute using formula with (:) and then take group by your certain field and take some in minutes all and then convert to normal time format.
By:xyzDate Of Posted:1/11/2011 5:46:55 AM
How to sum time
In my crystal report i have a field which displays time (for eg:10:30).Now my problem is how to sum these values when the report is grouped with certain field.Plzzz help
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top