Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How do I set Date-parameter default value to today Post Reply Post New Topic
Author Message
kaakelitoni
Newbie
Newbie


Joined: 06 Oct 2008
Location: Finland
Online Status: Offline
Posts: 5
Quote kaakelitoni Replybullet Topic: How do I set Date-parameter default value to today
     Posted: 31 Oct 2008 at 6:23am
Hi,

I have just changed from version 8.5 to XI. How can I set today-value (currentdate etc.) for static date-parameter? Now there's empty line in default-value box, and dropdownlist has nothing to choose from.


-Tounie
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Nov 2008 at 7:24am
I am confused.  It sounds like you want a string of some sort.  If you set the parameter to datetime, you get the Crystal Calendar control to aid in your selection.  If you want a drop down with dates and they correspond to data, you can use a dynamic parameter and populate the data from your data by adding a command (Database Expert) and selecting the dates from your data.  If you want a list of dates and it is of fixed length you can try something like: select getdate() union select datediff(day, -1, getdate()) union select datediff(day, -2, getdate()) in the command and make the parameter dynamic.
 
Hope one of these ideas gets you to where you need to go.
IP IP Logged
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