Crystal Reports How to utilize Current Date

I am trying to schedule a report that will extract data based upon a date parameter.  I would like the report to get the current date and use it for the run-date parameter.  How is this done?  I am using Crystal Reports 10
Thanks
mbroad02Asked:
Who is Participating?
 
peter57rConnect With a Mentor Commented:
Then use a selection rule of..

{table.Datefieldname}>=Currentdate and {table.Datefieldname}<Currentdate +1
0
 
peter57rCommented:
Set the record selection formula to something like..

{table.Datefieldname}=Currentdate

There can be lots of issues with dates; if this doesn't work as you expect we shall need to know the database type and  the field datatype to get further.
0
 
mlmccCommented:
DO you mean to use the current dat as the default value?

How are you running the report?

mlmcc
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
mbroad02Author Commented:
I am going to set the report up as a scheduled report, so I want the date in the record, which is a datetime to select based on current date (I guess I need to trim the record datetime field so that it doe not try to compare the datetime to the current date (remove time).
0
 
mbroad02Author Commented:
Don't know if I was clear in last post:  I wish to select data records matching data-records date to Currentdate.

The data-record date is actually a datetime field.  Therefore I would probably have to trim off the time and just make it a date field...
Hope that is clearer!
:)
0
 
mbroad02Author Commented:
Once I pared my datetime field to date only, the above worked just fine.

Thanks very much!
0
 
mbroad02Author Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.