Solved

Crystal Reports How to utilize Current Date

Posted on 2011-09-20
7
324 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 100

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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

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 500 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sort by a cross tab in crystal report 2 53
Crystal Reports with Yardi error 800a004b 2 133
Multiple Parameters in Crystal 11 78
shared number array to be used in subreport 8 31
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…
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…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 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