Create a date (time) parameter in Crystal Reports XI that defaults to the current date (time).

Posted on 2007-10-16
Last Modified: 2012-08-13
I have been using Crystal Reports versions 9 and 10.  Now that I have updated to XI, I want to create a date or date-time parameter that automatically defaults to the Current date or dateTime.  I tried filling in CurrentDateTime under Options: Default Value and it would not take.  
Question by:chaverly
    LVL 77

    Expert Comment

    Are you saying you could do that in CR9 & CR10?
    How did you do it?

    I don't know of any way in CRXI but then I didn't know it was possible in earlier versions.

    LVL 100

    Expert Comment

    I agree.  I don't see anyway to do it in CR XI, I tried using CurrentDate but that didn't work.  I was under the impression that you couldn't set a default to be the currentdate in Crystal for a date parameter.

    LVL 42

    Accepted Solution

    Agree.  Commonly you could handle this by setting a static parameter default such as 1/1/1900 then in your code / select expert treat that value as the current date.


    Author Comment

    Yes, when I created a date parameter and clicked on set Default Values, the dialog opens.  Under Set or Enter the value to add : M/D/YYYY, it automatically placed the current date in the drop down list box.  If you didn't push anything over to the right pane, the current date would automatically appear when the user refreshed.  
    LVL 100

    Assisted Solution

    I believe that now the current date is selected when you click the calendar.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    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…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    758 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now