Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: date parameter - Month only Post Reply Post New Topic
Author Message
Ariel
Newbie
Newbie


Joined: 10 Jun 2010
Location: United States
Online Status: Offline
Posts: 33
Quote Ariel Replybullet Topic: date parameter - Month only
    Posted: 30 Sep 2010 at 9:39am
I have a report that I set up with basic begin/end date parameters but the user wants to just enter a Month in the parameter and pull any record that is within that month (regardless of the year or day).  Is that possible?  If so how do I do it?
TIA!
Ariel
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Sep 2010 at 9:53am

do they want to enter a month name or number?

either way create a parameter (numeric or text depending on the answer above answer)
in your select expert for a number version
month(table.datefield)={?Param}
 
in your select expert for a text version
monthname(month(table.datefield))={?Param}
IP IP Logged
Ariel
Newbie
Newbie


Joined: 10 Jun 2010
Location: United States
Online Status: Offline
Posts: 33
Quote Ariel Replybullet Posted: 30 Sep 2010 at 10:18am
This is what I'm entering in Select Expert:
month({TCIA_Company.ACCRED_SINCE}={?Month})
and I'm getting a "this needs a date" error :(
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Sep 2010 at 10:20am
move the parenth...
month({TCIA_Company.ACCRED_SINCE})={?Month}
IP IP Logged
Ariel
Newbie
Newbie


Joined: 10 Jun 2010
Location: United States
Online Status: Offline
Posts: 33
Quote Ariel Replybullet Posted: 06 Oct 2010 at 5:11am
thank you!  That worked perfectly!  Smile
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.