Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Parameter based on current date Post Reply Post New Topic
Author Message
Novar
Newbie
Newbie


Joined: 22 Jan 2009
Online Status: Offline
Posts: 2
Quote Novar Replybullet Topic: Parameter based on current date
    Posted: 22 Jan 2009 at 11:29am
This should be so simple, but I've racked my brain to no avail...  I run a report based on two criteria. Basically show me records where both exist.  <field A> < "CurrentDate -7" AND <field B> > "CurrentDate-14".  When the user opens the report the report should update based on Today's Date.  Am I asking too much of CR??
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 22 Jan 2009 at 12:06pm
Not sure if you are doing =, < or > but Try:
{table.fieldA}=dateadd("d",-7,currentdate) and {table.fieldB}=dateadd("d",-14,currentdate)
 
and switch the = for whatever you were trying to match.


Edited by DBlank - 22 Jan 2009 at 12:10pm
IP IP Logged
Novar
Newbie
Newbie


Joined: 22 Jan 2009
Online Status: Offline
Posts: 2
Quote Novar Replybullet Posted: 22 Jan 2009 at 2:25pm

Works perfect.  Thanks a ton!

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.023 seconds.