IntroductionIn 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. ImplementationI 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. Then a new window open with create running total options and selections. 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. 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.
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. 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 recordUse the For each record option to have your running total evaluate each record in a field. On change of fieldUse 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 groupUse the On change of group option to have your running total perform its evaluation only when a specified group has changed. Use a formulaSelect 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 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 NeverUse 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 fieldUse 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 groupUse the On change of group list to have your running total evaluate or reset when a designated group changes. Use a formulaSelect 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. 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. Step 8 The report design is complete press F5 to see preview. The report preview as like below, ConclusionIn 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. |