Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Summarized Fields Grant Totals Post Reply Post New Topic
Author Message
HEMREDDY
Newbie
Newbie


Joined: 31 Jul 2013
Online Status: Offline
Posts: 38
Quote HEMREDDY Replybullet Topic: Summarized Fields Grant Totals
     Posted: 06 Feb 2014 at 9:28am
Hi,
 
I have Summarized fields in my report.
 
I had to group by Customer 1st and then Invoice number.
 
Get the balances by invoice Number using the sum function by invoice number.
 
Use the sum values by invoice for calculating interest. To get the interest totals by customer used the following formulas.
 
Formula 1(placed on the Group Header1)
 
WhilePrintingRecords;
 Global NumberVar Ordertotal;
 Ordertotal := (0)
 
Formula 2 (Placed Group Fotter 2)
WhilePrintingRecords;
 Global NumberVar Ordertotal;
 Ordertotal := Ordertotal + {@Interest }
 
Formula 3 ( Group Footer 1)
WhilePrintingRecords;
Global NumberVar Ordertotal;
 
I am able to get interest by the Customer. I want to get total interest for all customers as grand total.
 
Can anyone suggest a solution to this.
 
Thanking you,
 
Reddy
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 06 Feb 2014 at 12:31pm
Have you looked at just doing a Sum on Formula 3?

If that doesn't work, you could do something similar to get the grand total:

Formula Total1 in Report Header:
Global NumberVar interestTotal := 0;

Formula Total2 in Group Footer 1:
WhilePrintingRecords;
Global NumberVar interestTotal := interestTotal + {@Formula 3);

Formula Total3 in Report Footer:
WhilePrintingRecords;
Global Numbervar interestTotal;

Another option would be to create a Running Total that would sum your Formula3 on change of Group 1. This should give you the value you're looking for at the end of the report.

-Dell
IP IP Logged
HEMREDDY
Newbie
Newbie


Joined: 31 Jul 2013
Online Status: Offline
Posts: 38
Quote HEMREDDY Replybullet Posted: 07 Feb 2014 at 2:42am
Dell,
 
Thank you very much. That worked like a charm.
 
Reddy
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum