简体   繁体   English

需要在SSRS订阅上设置日期参数

[英]Need to set a date parameter on an SSRS subscription

I have a report in SSRS that takes a single date as a parameter. 我在SSRS中有一个报告,该报告将单个日期作为参数。 What I want is for that report to have a subscription that uses the Saturday of two weeks ahead as the date (ie, Monday 7/4 would give Saturday 7/16). 我要的是使该报表具有一个订阅,该订阅使用提前两周的星期六作为日期(即,星期一7/4将表示星期六7/16)。 How can I do this in the subscription? 如何在订阅中执行此操作? Looks like I can't do a formula in the parameter. 看起来我无法在参数中执行公式。

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. 在date参数的默认值中使用的表达式如下所示。 There both add 2 weeks to the current date. 两者都将当前日期增加2周。

=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. 只需双击要更改的参数,对话框就会打开。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM