Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Only show dates Post Reply Post New Topic
Author Message
superman22011
Newbie
Newbie
Avatar

Joined: 02 Feb 2012
Location: United States
Online Status: Offline
Posts: 9
Quote superman22011 Replybullet Topic: Only show dates
     Posted: 27 Jun 2014 at 6:07am
Good Morning you all,

I need help with a formula, Im trying to show "Date Release" that are 9 months and older anything that is 9months to current date to be suppressed. I hope i word this right and some is able to help me.

Thank You in advance.
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 27 Jun 2014 at 2:00pm
something like this
if datediff("m",Date Release,currentdate)>= 9 then Date Release else""
IP IP Logged
superman22011
Newbie
Newbie
Avatar

Joined: 02 Feb 2012
Location: United States
Online Status: Offline
Posts: 9
Quote superman22011 Replybullet Posted: 30 Jun 2014 at 6:07am
Thank you for your response, but now on Else"" its asking me for a Date-time?
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 30 Jun 2014 at 6:27am
then maybe just
if datediff("m",Date Release,currentdate)>= 9 then Date Release

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 01 Jul 2014 at 5:06am
you should be able to use the suppression formula option on the field format using kostya's formula.
datediff("m",Date Release,currentdate)>= 9
Note that is only calculating off the month value and not the day value
if you need the day then if would be something like
currentfieldvalue>dateadd('m',-9,currentdate)
 
also either formula can be used to supress the entire row as a formula used in the section expert or used to remove rows in the select expert.


Edited by DBlank - 01 Jul 2014 at 5:07am
IP IP Logged
superman22011
Newbie
Newbie
Avatar

Joined: 02 Feb 2012
Location: United States
Online Status: Offline
Posts: 9
Quote superman22011 Replybullet Posted: 01 Jul 2014 at 5:34am
Thank you so much! that worked! Clap
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