gpt4 book ai didi

sql-server-2005 - 在 Reporting Services 订阅的文件名中输入的变量

转载 作者:行者123 更新时间:2023-12-01 13:06:09 26 4
gpt4 key购买 nike

是否有一个列表列出了我可以在 SQL Server Management Studio 中用于报表订阅的文件名中的所有变量?我目前在我的文件名中使用 @timestamp,但想使用其他选项甚至删除部分时间戳(例如,只使用日期,而不是时间)。

最佳答案

不幸的是,@timestamp 是唯一可用的变量。格式化 @timestamp 有多种变通方法,但没有一个是简单的。这是一个解释一个(但不是唯一)解决方法的线程: http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/81f47009-946a-4ebc-be43-7690236e829b

如果该链接消失,建议如下:

To solve the issue, I would suggest using Data-Driven Subscription

A data-driven subscription provides a way to use dynamic subscription data that is retrieved from an external data source at run time. A data-driven subscription can also use static text and default values that you specify when the subscription is defined. We can use data-driven subscriptions to do the following:

Distribute a report to a fluctuating list of subscribers. For example, you can use data-driven subscriptions to distribute a report throughout a large organization where subscribers vary from one month to the next, or use other criteria that determines group membership from an existing set of users. Filter the report output using report parameter values that are retrieved at run time. Vary report output formats and delivery options for each report delivery. .

In this case, we can define the filename with timestamp in database and then use Data-Driven Subscriptions to delivey the report.

For more information about Data-Driven Subscriptions, please see:

For SQL Server Reporting Services 2005: http://msdn.microsoft.com/en-us/library/ms159150(SQL.90).aspx

For SQL Server Reporting Services 2008: http://msdn.microsoft.com/en-us/library/ms159150.aspx

关于sql-server-2005 - 在 Reporting Services 订阅的文件名中输入的变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3039474/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com