Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSRS DATE Parameters


SSRS DATE Parameters

Author
Message
sqlstunner
sqlstunner
Grasshopper
Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)

Group: General Forum Members
Points: 24 Visits: 145
Hi Folks,

I am working on a report on SQL Server 2008 R2 and i have 2 date parameters. Start Date and End Date.
Every time when i want to see preview, i need to mention both Start Date and End date and i used to see the report.

I got a new requirement that i need to add another parameter 'Effective Date'. Adding a parameter is easy but here is the twist. The requirement is, if i mention the Effective Date (not mentioning Start Date and End Date) and click View Report i need to see the report. Usually when i did that, a pop up shows up that i need to select Start Date and End Date.

Do we have any way that we can mention either (Start Date and End Date) or Effective Date and vice versa.

Thanks,
SK
Ray M
Ray M
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1491 Visits: 1076
In SSRS you cannot specifiy optional parameters in this way.

You can allow nulls in all 3 parameters. and then the user has to know what to put in or not.

Or you can add a dropdown parameter that has values, Effective Date, Start Date.
and 2 date fields. With the second date field allowing nulls.
Pass the Drop down Parameter to your code to figure out what to do with the dates passed in.
sqlstunner
sqlstunner
Grasshopper
Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)

Group: General Forum Members
Points: 24 Visits: 145
Thanks Ray.. Will try that...
Tee Time
Tee Time
Mr or Mrs. 500
Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)Mr or Mrs. 500 (565 reputation)

Group: General Forum Members
Points: 565 Visits: 465
Will it be start date, end date and effective date or start date and end date OR effective date?
sqlstunner
sqlstunner
Grasshopper
Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)

Group: General Forum Members
Points: 24 Visits: 145
It should be Start Date and End Date OR effective date and vice versa..
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search