all groups > sql server reporting services > december 2004 >
You're in the

sql server reporting services

group:

Combining the DropDown List with Text to select Date inputs


Combining the DropDown List with Text to select Date inputs Michael Black
12/14/2004 4:59:07 PM
sql server reporting services: Hi

I have written the following Union Query to Calculate a list of commonly
used dates for use as StartDate Values in my report. I was wondering if it is
possible to allow the date to be manually entered into the parameter field as
well as been able to select the common inputs from a dropdown list based on a
query. At the moment if I can only do one or the other. Does any one have any
suggestions how I could improve this date selection process that doesn't
involve a calendar control (or has a really good example of utilising the
calendar control). Help would be much appreciated.

Thankyou

Michael Black

set DATEFIRST 1

select "StartDate"= Convert(VARCHAR,GetDate(),112), "Label" = 'Today',
"Sort" = 1
UNION
Select Convert(VARCHAR,GetDate()-1,112),'Yesterday',2
UNION
select CONVERT(VARCHAR,DATEADD(dd, 1 - DATEPART(dw, getdate()),
getdate()),112),'Current Week', 3
UNION
select Convert(VARCHAR,DATEADD(dd, 1 - (DATEPART(dw, getdate())+7),
getdate()),112),'Previous Week', 4
UNION
Select DATEADD(mm, DATEDIFF(mm,0,getdate()), 0),'Current Month',5
UNION
Select DATEADD(mm, DATEDIFF(mm,0,getdate())-1, 0),'Previous Month',6
UNION
Select DATEADD(yy, DATEDIFF(yy,0,getdate()), 0),'Current Year',7
Order By Sort

RE: Combining the DropDown List with Text to select Date inputs JP.Sklenka
12/14/2004 7:51:04 PM
The parameter controls offer somewhat limited functionality out of the box
(ie virtually no validation in addition to the problem you're having). The
good news is that the RS team allows you to make requests for reports using
the SOAP API's. This means that you can create your own windows or web ui to
collect (and even validate) parameters before sending the request to the
report server. I don't know that there's a clean way to accomplish what
you'r looking for otherwise. You might check
http://www.sqlreportingservices.net or http://blogs.msdn.com/ChrisHays/

[quoted text, click to view]
AddThis Social Bookmark Button