Link to home
Start Free TrialLog in
Avatar of mbroad02
mbroad02Flag for United States of America

asked on

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
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

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.
Avatar of Mike McCracken
Mike McCracken

DO you mean to use the current dat as the default value?

How are you running the report?

mlmcc
Avatar of mbroad02

ASKER

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).
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!
:)
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Once I pared my datetime field to date only, the above worked just fine.

Thanks very much!
Thanks