Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Crystal Reports How to utilize Current Date

Posted on 2011-09-20
7
Medium Priority
?
341 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
  • 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
Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

877 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