Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Today's Date

Today's Date

Today's Date

I have a report I run daily. I open it up, I click on Select Expert and change an "is equal to" parameter from the date there to the date I am running it. It's always today's date. For example, I open it up today and it has Friday's date. I type over that w/ today's date. Is there anyway to just have it pull "today's date" when I open it?

RE: Today's Date

From the Report menu, choose Selection Formulas, Record.
Alter your record selection formula to use this logic:

{table.datefield} = currentdate


RE: Today's Date

I'm not sure what version of Crystal you have, but there is an easy way in XI.  Open the record selection window and "Show Formual" and then go into the Formula editor.  Then your formula should have {table.Field}= (00,00,0000) or something.  change it to read:

{table.Field}= DateTime(CurrentDateTime)

If you have just a date field (no time), then

{table.Field}= Date(CurrentDate)

See if that works...

RE: Today's Date

Your problem is that you are using the very limited Select Expert, instead of using the record selection formula that was suggested by dbreed35.

There are tons of things you can do with a record selection formula that you cannot do with the select expert.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?"

RE: Today's Date

I went into Record Selection and put in my field then the = Date{CurrentDate} but got this box that says "A date-time is required here.". This field is a string and appears MM/DD/YY. Maybe I have to do something else first to the string? Convert it to a date?

RE: Today's Date

If it is a string on the database side, then you will need to convert the currentdate field to a string:

{table.date} = ToText(currentdate,"MM/dd/yyyy")


RE: Today's Date

It says False on my report

RE: Today's Date

Where are you placing this formula?  It should be under Report|Selection Formulas|Record.


RE: Today's Date

that's where i am putting it  

RE: Today's Date

This is what I did: because me order date is a string I used your formula and created my own ORD DTE:
{ORDER_HEADER_A.ORDER_DATE} = ToText(currentdate,"MM/dd/yyyy")

Then I went into Report|Selection Formulas|Record and

{@ORD DTE} = currentdate

Now I get a boolean is required here when I tried to accept it

RE: Today's Date

You shouldn't be putting in it's own formula.
Just put this directly in the record selection formula:

{ORDER_HEADER_A.ORDER_DATE} = ToText(currentdate,"MM/dd/yyyy")  


RE: Today's Date

Genius! I was totally making that much harder than it was. Thank you so much! Sorry for being a pain!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close