Click to See Complete Forum and Search --> : Crystal Reports
cid
Sep 30th, 2003, 08:47 PM
Ok, I have a database with a field name of detention date. This field stores the most recent detention date in it. So my question is in crystal reports how do I sort it out so It will only print the data if the field "detention date" that has the today's date?
brucevde
Oct 1st, 2003, 01:35 AM
In the record select formula add
{TableName.DetentionDate} = CurrentDate
cid
Oct 1st, 2003, 12:36 PM
Ill try that and see if it works tonight...
cid
Oct 2nd, 2003, 08:40 AM
That didnt work. All's that did was put the most current date on top and the other dates on the bottom. What I need to do is only display the current date.
brucevde
Oct 2nd, 2003, 09:50 AM
Without seeing your report, then I can only guess as to what has happened.
If adding the code I posted changed the sort order then you may have placed it in the wrong location. Make sure it goes in the Record Selection Formula.
cid
Oct 2nd, 2003, 12:12 PM
Here is the entire proj. With the reoport. You made need to edit it so it will work on your PC. I am using the ld(converted).mdb database for the proj.
ARPRINCE
Oct 2nd, 2003, 01:17 PM
{TableName.DetentionDate} = "CurrentDate"
I look at it briefly. I say remove the quotes on the CurrentDate. Also, your detention date is actually a MEMO field. You need to convert this first into a date format by using CDATE.
CDATE({TableName.DetentionDate}) = CurrentDate
Also, you may have a problem if the field "detentiondate" contains more than a date. (i.e. If it has remarks before and after the detention date itself, how would you be able to pick out the date within the memo remarks?)
cid
Oct 10th, 2003, 09:32 AM
The code doesnt filter dates. I need Crystal Reports Code that will filter the current date. So on the report the current date is the only date shown.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.