?
Solved

Allowing blank date parameters in Crystal reports XI

Posted on 2007-10-08
5
Medium Priority
?
6,158 Views
Last Modified: 2012-05-05
I'm developing a report in Crystal Reports XI  (version 11.0.0.895).  I have created a date range
parameter, but I need to allow the user to leave it  blank if he wants.  The problem is that
Crystal  keeps forcing the user to put something (non-null) in the date range field.  
Is there a workaround for this?  This is a simple report and I am  not using stored procedures or VB.
Here is what I am using for setup values for the Date parameter:
 
                   List of values:   Static

                  Options:
                  prompt text                                      Enter Starting Date:
                  prompt with description only          False
                  Default value                                  
                  Allow custom values                     True
                  Allow multiple values                     False
                  Allow discrete values                    False
                  Allow range values                       True
                  Start
                  End

Thanks for your help.
Ray




0
Comment
Question by:rayshin
4 Comments
 
LVL 42

Accepted Solution

by:
frodoman earned 500 total points
ID: 20034463
Crystal is going to always require the parameter.  What you can do is set a default value of some arbitrary date (01/01/1900) and then set your report to handle that date differently - for example in your select expert have a formula like:

if {?DateParam} = Date(1900,1,1) then
   true
else
   {Table.Field} = {?DateParam};


frodoman
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 20034613
Agree.

mlmcc
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20246511
Forced accept.

Computer101
EE Admin
0
 

Expert Comment

by:robotcat
ID: 25842927
This is a sufficient workaround for my needs.  Thanks!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

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…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

569 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