?
Solved

Crystal Reports How to utilize Current Date

Posted on 2011-09-20
7
Medium Priority
?
334 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:mbroad02
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 36567331
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 36567596
DO you mean to use the current dat as the default value?

How are you running the report?

mlmcc
0
 

Author Comment

by:mbroad02
ID: 36567721
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:mbroad02
ID: 36567819
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
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 36567824
Then use a selection rule of..

{table.Datefieldname}>=Currentdate and {table.Datefieldname}<Currentdate +1
0
 

Author Comment

by:mbroad02
ID: 36569319
Once I pared my datetime field to date only, the above worked just fine.

Thanks very much!
0
 

Author Closing Comment

by:mbroad02
ID: 36569322
Thanks
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question