Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to create date range parameter in RS2005? Expand / Collapse
Author
Message
Posted Wednesday, December 12, 2012 3:10 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Saturday, February 2, 2013 11:09 AM
Points: 97, Visits: 180
Hi folks,
I have created to parameter. @StartDate and @EndDate withe this statement:
Select * From table where ENTRY_D BETWEEN @StartDate and @EndDate.
Firstly i want the dates select-able from calendar would be older or equals to today. Greyed out those after today.

Secondly what can i do so that their selection of EndDate parameter would not be older(must be later) than what they have selected in StartDate parameter?

Lastly how to assign default values to @startDate as MIN(ENTRY_D) and default values to @endDate as MAX(ENTRY_D)? My ENTRYDATE is in m/d/yyyy hh:mm:ss format.

Is all these possible? If it is, anyone has article or tutorial on this? Or anyone willing to guide me through?

Thanks,
10e5x
Post #1395541
Posted Wednesday, December 12, 2012 11:01 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 12:03 PM
Points: 1,480, Visits: 1,028
None of this is possible out of the box SSRS.
If you want available dates you can use a query and populate the parameter, however it changes the control to a listbox, and not a calendar control.

and other than code you cannot validate dates.

Similar thread
http://www.sqlservercentral.com/Forums/Topic537763-145-1.aspx
Post #1395814
Posted Wednesday, December 12, 2012 5:30 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Saturday, February 2, 2013 11:09 AM
Points: 97, Visits: 180
Thanks Ray for the information. Maybe i am too use to asp.net, thinking every report should have all these. Btw what about search functions? Read the thread too.
Btw in any case, search functions are possible. Meaning i have a textbox with a button in the report. And i can do a search on the displayed data
Btw u helped me alot since my earlier post. Thanks. Appreciated ur help:)

Update: From the link u provided, i derived a similar solutions to my question for the date range selection. Thanks for your help.
Post #1395940
Posted Thursday, December 13, 2012 1:57 PM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 12:03 PM
Points: 1,480, Visits: 1,028
The Report viewer has a search function built in. In the bar with the export icon and such there's a search textbox and link that works for this.

Happy to help
Post #1396389
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse