Need to set a date parameter on an SSRS subscription

心已入冬 提交于 2019-12-12 03:38:54

问题


I have a report in SSRS that takes a single date as a parameter. What I want is for that report to have a subscription that uses the Saturday of two weeks ahead as the date (i.e., Monday 7/4 would give Saturday 7/16). How can I do this in the subscription? Looks like I can't do a formula in the parameter.


回答1:


You have to set the default parameter value in the report, not in the subscription. An expression to use in the default for the date parameter would look something like this. There both add 2 weeks to the current date.

=DataAdd(DateInterval.WeekOfYear, 2, Today)

or

=Today.AddDays(14)

The default values can be set using the Report Parameters Properties dialog in the report designer. Just double-click on the parameter you want to change and the dialog will open.



来源:https://stackoverflow.com/questions/38273583/need-to-set-a-date-parameter-on-an-ssrs-subscription

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!