Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sum and Where clause Post Reply Post New Topic
Author Message
colkas
Newbie
Newbie


Joined: 20 Dec 2009
Location: United Kingdom
Online Status: Offline
Posts: 5
Quote colkas Replybullet Topic: Sum and Where clause
     Posted: 20 Dec 2009 at 6:42am
I am trying to create a formula to sum a field where another field is Period 1.  Basically I have two fields  Invoice Amounts  and Periods (1 to 12).
I want to sum all Invoice Amounts but thave them in sepreated periods, so I ahve totals for 1 to 12 periods.   from there I intend to out actual budget against Invoiced and then take the 2 away from each other.
 
How do I create the formula, I ahve tired several syntax but with no luck.
Thanks
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 21 Dec 2009 at 6:18am
you would need a group on period, then you can create a formula like:
sum({table.InvoiceAmount}, {table.Periods}).  For this to be valid, you need to have a group defined by {table.Periods}
 
This will give you a sum of the invoices in that period, I don't know if that is sufficent for your task.
 
HTH
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