views:

44

answers:

2

I am learning SSRS so this is probably an extremely easy solution. I have a bunch of reports that were rebuilt to match some old Access reports. For each report, we have to be able to run Current, Last, Next or Adhoc dates. Is there an easy way if a user selects Adhoc to then show the parameters selections for Start and End Date for the Adhoc selection? Right now, I have people who select Current and then go and put in dates.

 WHERE  (:AGNT='--AllNoFilter--'  OR AGNT =:AGNT)
AND (:DateRunOption <> 'CM' OR TO_CHAR(MONTH_END_DT, 'Month YYYY') = TO_CHAR(CURRENT_DATE, 'Month YYYY'))
AND (:DateRunOption <> 'LM' OR TO_CHAR(MONTH_END_DT, 'Month YYYY') = TO_CHAR(ADD_MONTHS(CURRENT_DATE, -1), 'Month YYYY'))
AND (:DateRunOption <> 'AD' OR MONTH_END_DT>= :BeginDateFrom)
AND (:DateRunOption <> 'AD' OR MONTH_END_DT<= :BeginDateTo)

Thank you for any assistance you can provide

A: 

I use a stored procedure to handle date range parameters. A dropdown list on every report offers dynamic ranges like "Previous Month" or "Previous 7 Days". One of the options is "Specific Dates" and if the user picks it, they're expected to uncheck the Null box next to the Start Date and End Date parameters and fill them in. Validation is done through the stored procedure, which just throws a descriptive error if the both a dynamic range and specific dates are provided.

JC
A: 

You can have cascading parameters in Reporting Services.

You can also specify whether or not the parameters have defaults, you can even use queries to specify defaults.

You could have the 'date run type' as a drop down, then show two dates, with one of them defaulted to NULL if necessary.

Alternatively you could have a text field converted to a date if the user prefers.

adolf garlic