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

SSRS DATE Parameters Expand / Collapse
Author
Message
Posted Thursday, July 25, 2013 11:24 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, September 11, 2014 1:42 PM
Points: 20, Visits: 130
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





Post #1477643
Posted Thursday, July 25, 2013 12:54 PM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Friday, September 19, 2014 2:29 PM
Points: 1,481, Visits: 1,031
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.
Post #1477686
Posted Thursday, July 25, 2013 1:07 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, September 11, 2014 1:42 PM
Points: 20, Visits: 130
Thanks Ray.. Will try that...
Post #1477692
Posted Friday, July 26, 2013 6:37 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, July 24, 2014 1:50 PM
Points: 531, Visits: 448
Will it be start date, end date and effective date or start date and end date OR effective date?
Post #1477968
Posted Friday, July 26, 2013 4:38 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, September 11, 2014 1:42 PM
Points: 20, Visits: 130
It should be Start Date and End Date OR effective date and vice versa..
Post #1478241
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse