Print Page | Close Window

?? Default "Discrete Value" to Current Date ??

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2022
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=595
Printed Date: 02 Apr 2025 at 2:05pm


Topic: ?? Default "Discrete Value" to Current Date ??
Posted By: peter
Subject: ?? Default "Discrete Value" to Current Date ??
Date Posted: 27 Apr 2007 at 10:16am
Can we do this with CR 10 Designer to set the Discrete Value (Date) to Current Date for the parameter ?
Please help.



Replies:
Posted By: EscApe
Date Posted: 06 May 2007 at 4:43am
I suggest the following solution.

- set your default value for parameter to history (a date that you know, will never be used in this report, in my example it is set to 1.1.2007)

- add if statement to Select Expert:
If {?PDate}=date(2007,1,1) Then {Invoice.InvoiceDate} = CurrentDate else {Invoice.InvoiceDate} = {?PDate}

I have found this solution useful, although it would be easier, if you could just set value to CurrentDate.


Posted By: peter
Date Posted: 06 May 2007 at 10:39am
Thank you for the option. However, my users want a lot more than just the current-date which I used Stored Procedure the resolve it. I dont know why BO created such Product that I can not do much !!!


Posted By: EscApe
Date Posted: 06 May 2007 at 11:31pm
Did you notice, that the suggested solution uses current date as a default, but also allows users to select their own date as a parameter?

By the way, BO just bought Crystal Reports and thus did not create it. Crystal Reports is actually quite flexible reporting program compared to its competitors, but if you have learned to use another one, it is harder to learn easier way to make things.



Print Page | Close Window