question

yxzhou624 avatar image
yxzhou624 asked

Changing the Period value will not cause the date values to automatically change while running Report

Hi, on SSRS 2008, I want to allow end users to subscribe to, and have the default date values vary depending on whether subscription was a daily, weekly, or monthly one. Here is an example for the start date parameter default value expression. =Switch(Parameters!Period.Value = "Daily" , DateAdd(DateInterval.Day, -1, Today), Parameters!Period.Value = "Weekly" , DateAdd(DateInterval.WeekOfYear, -1, DateAdd(DateInterval.Day, -(DatePart(DateInterval.Weekday, Today, 0, 0)-1), Today)) , Parameters!Period.Value = "Monthly" , DateAdd(DateInterval.Month, -1, DateAdd(DateInterval.Day, -(DatePart(DateInterval.Day, Today, 0, 0)-1), Today))) For the end date parameter… =Switch(Parameters!Period.Value = "Daily" , Today, Parameters!Period.Value = "Weekly" , DateAdd(DateInterval.Day, -(DatePart(DateInterval.Weekday, Today, 0, 0)), Today) , Parameters!Period.Value = "Monthly" , DateAdd(DateInterval.Day, -(DatePart(DateInterval.Day, Today, 0, 0)), Today)) However, Changing the Period value either in the report designer (preview), or online, will not cause the date values to automatically change. It will while creating (and thus executing) a subscription, Does anyone have any thoughts about it? Appreciate it!!
ssrs-2008sql2008
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.