Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Date format Post Reply Post New Topic
Author Message
Molly152
Newbie
Newbie


Joined: 15 Dec 2008
Online Status: Offline
Posts: 2
Quote Molly152 Replybullet Topic: Date format
     Posted: 13 Feb 2014 at 3:09am
I'm very new to Crystal Reports and I'd appreciate any help.  I have created a sub report because it has many actions for each person, each line shows a specific action with an action date, some of which are years in the future.  I'd like the report to show past dates and only those that are up to 90 days in the future for today's date.
 
I've read many posts and I'm getting very confused.  I've tried things like selecting the date field in the sub report, then Select Expert - is greater than - 'd', 90, today.  This does not show the information that I need so I'd really like help to understand where I'm going wrong.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Feb 2014 at 4:11am
table.datefield <=dateadd('d',90,currentdate)
IP IP Logged
Molly152
Newbie
Newbie


Joined: 15 Dec 2008
Online Status: Offline
Posts: 2
Quote Molly152 Replybullet Posted: 13 Feb 2014 at 5:08am
Thanks for your response, but sorry I don't know where to put the information you sent.  If I add a formula field  {datefield} <=dateadd('d',90,currentdate) it returns values of true or false.  If I use Report, then Select Expert, "is less than or equal to" and enter the information you sent in the blank field, it is automatically changed to 'd',90,currentdate.
 
When I preview the report it still shows action dates that are greater than 90 from today'd date.
 
Please can you tell me where and how the code should be used.  Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Feb 2014 at 6:50am

It goes in the select expert.

Do you want this to apply to to your main report or subreport data?
Depending on that answer it would go in the select expert of that portion of the report.
 
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