SSRS DATE Parameters

  • 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

  • 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.

  • Thanks Ray.. Will try that...

  • Will it be start date, end date and effective date or start date and end date OR effective date?

  • It should be Start Date and End Date OR effective date and vice versa..

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply