I've set up an "Aggregate level" parameter on a SSRS report, so that I could easily schedule subscriptions for daily, weekly and monthly aggregates.

The parameter has a Text datatype, and doesn't allow blanks, nulls, or multiple values.

I've set up the available values with string expressions, so the value for "yesterday" is ="DD":

available values: 'yesterday', 'this week', 'this month', 'this quarter', 'this year', 'last week', etc.

When I ran the report in preview mode in Visual Studio, the report worked as expected with all parameter values, so I deployed it to the report server.

Then I proceeded to set up the subscriptions. "DD" / "yesterday" being the default value, I had no problem setting up the daily subscription.

This is how I set up the weekly:

selected value 'last week'

And the monthly:

selected value 'last month'

Problem is, if I run the SQL Server Agent job for these subscriptions, I get a report with a heading that says in big bold letters it's "Daily" - and if I go back to the weekly or monthly subscription parameter settings, I see this:

selected value 'yesterday'

How do I make a text parameter "stick" when I set its value in a subscription?

  • Side note: I was able to set up the subscription by changing the parameter type to integer, and using numeric values instead of strings like "DD", "LW" and "TM". This question is really about making this work for text type parameters. – Mathieu Guindon Dec 8 '15 at 23:28

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.