Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: How can I spread a value over a date range Post Reply Post New Topic
Author Message
j9hotz
Newbie
Newbie
Avatar

Joined: 18 Sep 2009
Location: United States
Online Status: Offline
Posts: 5
Quote j9hotz Replybullet Topic: How can I spread a value over a date range
     Posted: 02 Sep 2010 at 11:24am
using crystal 2008
 
How can I spread a dollar value over a specified date range?
 
Example
 
$1000 a month for the date range of 10/1/2011-9/30/2013
 
Expectation
 
Oct 2011  Nov 2011  Dec 2011  etc.   Total
1000.00    1000.00    1000.00           24,000.00
 
Thanks!!
j9hotz
IP IP Logged
j9hotz
Newbie
Newbie
Avatar

Joined: 18 Sep 2009
Location: United States
Online Status: Offline
Posts: 5
Quote j9hotz Replybullet Posted: 03 Sep 2010 at 7:45am
I am still hoping someone can help me with this one... Thanks!!
j9hotz
IP IP Logged
Crystal Bee
Newbie
Newbie
Avatar

Joined: 09 Aug 2010
Online Status: Offline
Posts: 17
Quote Crystal Bee Replybullet Posted: 03 Sep 2010 at 9:24pm
hello,
 wot i can understand from dis is u jus want to display amount with $ sign for Jan to Sept months...for oct,Nov, Dec you dont want to use $.if i am ryt den you can go for format field option.in dat, customize currency symbol and write condition in dat.
if not den plz specify the condition.
okies..
IP IP Logged
j9hotz
Newbie
Newbie
Avatar

Joined: 18 Sep 2009
Location: United States
Online Status: Offline
Posts: 5
Quote j9hotz Replybullet Posted: 04 Sep 2010 at 5:59am
Basically all I have is one column with an amount and then a start and end date.  What I need is that amount spread into multiple columns by month.
 
Here is the data I have:
 
Amount     Start Date     End Date
1000.00     1/1/2011     6/30/2011
 
What I need is:
 
Jan 2011   Feb 2011    Mar 2011   Apr 2011  May 2011   Jun 2011   Total
1000.00    1000.00     1000.00     1000.00   1000.00     1000.00    6000.00
 
I hope this helps...
 
j9hotz
IP IP Logged
Crystal Bee
Newbie
Newbie
Avatar

Joined: 09 Aug 2010
Online Status: Offline
Posts: 17
Quote Crystal Bee Replybullet Posted: 06 Sep 2010 at 11:36pm
hello,
if you want to display it monthwise then you need to create 12 formulas for dat...one formula for each month.
use 'month' function to get month number...
 
following are the field names i hav used...
Start Date:{StartDate}
End DAte:{EndDate}
Amount:{Amount}
 
in january formula code will be:
if (Month({StartDate}) <= 1 and Month({EndDate}) >= 1) then {Amount} else 0
in February formula code will be:
if (Month({StartDate}) <= 2 and Month({EndDate}) >= 2) then {Amount} else 0
 
in March formula code will be:
if (Month({StartDate}) <= 3 and Month({EndDate}) >= 3) then {Amount} else 0
 
 
and so on....
then create one formula to get total of all...
code:
 
place each formula next to each oder and u'll get the output...
kindly let me knw if it is useful...okies...al da best!!


Edited by Crystal Bee - 06 Sep 2010 at 11:49pm
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