Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Last Months Data Formula Post Reply Post New Topic
Author Message
rbescos
Newbie
Newbie


Joined: 10 Aug 2010
Location: United States
Online Status: Offline
Posts: 13
Quote rbescos Replybullet Topic: Last Months Data Formula
     Posted: 03 Jan 2011 at 12:30pm

I need some help with a formula I have been using to pull dates for the previous month.  It has worked great all year until happy New Year.  How do I edit this formula to take into account a change in year?  My report for Dec 2010 that is being pulled in Jan 2011 turns up blank.

Month({Proccesor.Funding Dt}) = Month(DateAdd("m", -1, currentdate)) and year({Proccesor.Funding Dt}) =year(currentdate)

Thank you in advance 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 04 Jan 2011 at 3:49am
Try something like this:
 
Month({Processor.Funding Dt}) = Month(DateAdd("m", -1, currentdate)) and Year({Processor.Funding Dt}) = Year(DateAdd("m", -1, currentdate))
 
-Dell
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 04 Jan 2011 at 4:47am
or maybe
{Proccesor.Funding Dt} in LastFullMonth
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