Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Allow blank date parameter value in a report using a Datetime picker?

Status
Not open for further replies.

rogerzebra

Technical User
May 19, 2004
216
0
0
SE
Hello All,

I have an issue with my store procedure that has several date parameters in a report that allow blank values. When I try to execute the report my datetime picker force me to pick a date, how to get around this?

I tried using expressions in the front-end with something like this:

=IIF(Fields!Date.Value Is Nothing,"// ",Fields!Date.Value)

Also, I red a post somewhere that I could set the parameter values in VS such as

exec dbo.dateTest
@StartDt,'StartDate',''
,@StartDt,'EndDate',''

But, I can't get any of these to work. Any ideas? All help would be greately appreciated. Thx
 
You could create a boolean parameter with the prompt "Return All Dates," and your query could look something like:

Code:
SELECT * FROM SomeTable WHERE (@ReturnAllDates = 1) OR (TheDate BETWEEN @StartDate AND @EndDate)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top