Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sum a formula based on a group Post Reply Post New Topic
Author Message
wasfree
Newbie
Newbie
Avatar

Joined: 03 Apr 2012
Online Status: Offline
Posts: 2
Quote wasfree Replybullet Topic: Sum a formula based on a group
     Posted: 03 Apr 2012 at 10:11am

Hello I have a situation that i cant figure out.

 

 

Imagine this, i have a database where i have two currencies say USD and Pounds

(i should also mention there is a currency group)

and i have this field where i wanna get this average.

 

so one field is as follows

 

Sum.fund  = (Sum of fund, resets on a group)

 

totalfieldans  (name of formula field)   =    SUM({personal.fund})

and

{#Sum.fund}/{@totalfieldans}*100

 

So  basically what i want to do is, the sum of fund / totalfieldans* 100

this works 99% the only issue is, getting totalfieldans is supposed to group by currency

 

so lets say the SUM of USD is 50 and the SUM of Pounds is 60

for fields under the USD group i expect  the formula to be

fund / 50* 100

NOT

fund / 110* 100

 

Thanks for your help

IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 03 Apr 2012 at 9:41pm
sum({table.valuefield},{table.currencygroupfield})
 
That's should be your totalfieldans formula.
 
Regards,
Ryan.
IP IP Logged
wasfree
Newbie
Newbie
Avatar

Joined: 03 Apr 2012
Online Status: Offline
Posts: 2
Quote wasfree Replybullet Posted: 04 Apr 2012 at 3:04am
tHANKS!

that solved it
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