Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Summarizing a column of formula fields... Post Reply Post New Topic
Author Message
jakbo
Newbie
Newbie


Joined: 02 Jul 2008
Online Status: Offline
Posts: 11
Quote jakbo Replybullet Topic: Summarizing a column of formula fields...
     Posted: 02 Jul 2008 at 4:40pm
Hello,

I'm having problems figuring out how to summarize a column within a group.  Each entry in the column is a result of a formula and, for some reason, Crystal Reports 11 won't let me summarize this column.  Is there some sort of rule that says I can't summarize formula fields?
IP IP Logged
pixie_1
Newbie
Newbie
Avatar

Joined: 02 Jul 2008
Location: Australia
Online Status: Offline
Posts: 5
Quote pixie_1 Replybullet Posted: 02 Jul 2008 at 11:27pm
This is how I do it but it may be by no way the best way to do it.


Input a shared variable into your formulas for example:

Whileprintingrecords;
Shared numbervar total

If {string.name} = 'harry' Then
total:=Total + 1

basically that is a count, but you can do the same with any valuesSo instead of the +1 if it was a values you could say

If {string.name} = 'harry' Then
total:=Total + {Salary}; 'yes I know this is a currency, you should change your variable type to currencyvar'

Total;

--------

In another formula you can then call the variable

Whileprintingrecords;
Shared currencyvar total;
total;

hope this helps
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