Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: ?? Default "Discrete Value" to Current Date ?? Post Reply Post New Topic
Author Message
peter
Groupie
Groupie


Joined: 08 Apr 2007
Location: United States
Online Status: Offline
Posts: 51
Quote peter Replybullet Topic: ?? Default "Discrete Value" to Current 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.
IP IP Logged
EscApe
Newbie
Newbie


Joined: 13 Nov 2006
Location: Finland
Online Status: Offline
Posts: 37
Quote EscApe Replybullet 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.
IP IP Logged
peter
Groupie
Groupie


Joined: 08 Apr 2007
Location: United States
Online Status: Offline
Posts: 51
Quote peter Replybullet 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 !!!
IP IP Logged
EscApe
Newbie
Newbie


Joined: 13 Nov 2006
Location: Finland
Online Status: Offline
Posts: 37
Quote EscApe Replybullet 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.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.