SQL Reporting Services 订阅不允许修改收件人:字段

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/947379/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 02:18:31  来源:igfitidea点击:

Reporting Services Subscriptions won't allow modification of the To: Field

sqlsql-serversql-server-2008reporting-services

提问by jgardner04

I have a little issue that is causing me a headache. Our Report Server is SQL Ent 2008 on a Win 2008 server. When users that have Report Browser permissions try to set up a report subscription the To: field is grayed out and pre-populated with their username. They cannot change this and it won't deliver to their email address which would be [email protected]. Any leads would be greatly appreciated.

我有一个小问题让我头疼。我们的报表服务器是 Win 2008 服务器上的 SQL Ent 2008。当具有报告浏览器权限的用户尝试设置报告订阅时,收件人:字段将灰显并预先填充其用户名。他们无法更改这一点,也不会发送到他们的电子邮件地址,即 [email protected]。任何线索将不胜感激。

回答by gbn

"Site Settings".."Configure item-level role definitions".."Browser"

“站点设置”..“配置项目级角色定义”..“浏览器”

They can only "Manage individual subscriptions". SSRS won't allow the email address to be changed because they could put any stuff in there.

他们只能“管理个人订阅”。SSRS 不允许更改电子邮件地址,因为他们可以将任何内容放入其中。

In BOL, Managing Subscriptions... and How to: Subscribe to a Report (Report Manager), which leads to Configuring a Report Server for E-Mail Delivery. This says:

在 BOL 中,管理订阅... 以及如何:订阅报告(报告管理器),这将导致为电子邮件传送配置报告服务器。这说:

Configuration Options for Setting the To: Field in a Message

User-defined subscriptions that are created according to the permissions granted by the Manage individual subscriptions task contain a pre-set user name that is based on the domain user account. When the user creates the subscription, the recipient name in the To: field is self-addressed using the domain user account of the person creating the subscription.

If you are using an SMTP server or forwarder that uses e-mail accounts that are different from the domain user account, the report delivery will fail when the SMTP server tries to deliver the report to that user.

To workaround this issue, you can modify configuration settings that allow users to enter a name in the To: field:

  1. Open RSReportServer.config with a text editor.
  2. Set SendEmailToUserAlias to False.
  3. Set DefaultHostName to the Domain Name System (DNS) name or IP address of the SMTP server or forwarder.
  4. Save the file.

用于设置收件人的配置选项:消息中的字段

根据管理个人订阅任务授予的权限创建的用户定义订阅包含基于域用户帐户的预设用户名。当用户创建订阅时,收件人:字段中的收件人名称是使用创建订阅的人的域用户帐户自行寻址的。

如果您使用的 SMTP 服务器或转发器使用与域用户帐户不同的电子邮件帐户,则当 SMTP 服务器尝试将报告传递给该用户时,报告传递将失败。

要解决此问题,您可以修改允许用户在收件人:字段中输入名称的配置设置:

  1. 使用文本编辑器打开 RSReportServer.config。
  2. 将 SendEmailToUserAlias 设置为 False。
  3. 将 DefaultHostName 设置为 SMTP 服务器或转发器的域名系统 (DNS) 名称或 IP 地址。
  4. 保存文件。

回答by MRAS

I realize that this is on a 3 year old post (there was activity on it 5 months ago as of this posting though) but I found one other tid-bit that may be of use to others trying to get around this.

我意识到这是在一个 3 年前的帖子上(尽管在 5 个月前发布了这个帖子),但我发现了另一个可能对其他试图解决这个问题的人有用的花絮。

As part of the configuration file RSReportServer.config as mentioned in above answers found at installdir\Reporting Services\ReportServer\ there is a section of the file that you can add your domain name to that works in conjunction with the users alias.

作为在installdir\Reporting Services\ReportServer\找到的上述答案中提到的配置文件 RSReportServer.config 的一部分,您可以将您的域名添加到该文件的一部分,该部分与用户别名一起使用。

The tag to edit is DefaultHostNameas stated in Microsofts documentation this value works with the SendEmailToUserAliastag when it's set to true.

要编辑的标记是Microsoft 文档中所述的DefaultHostName,该值在设置为 true 时与SendEmailToUserAlias标记一起使用。

The end user still has a grayed out To: field that shows their AD user alias, however when they setup a subscription to email a report, at execution time the SMTP server appends the specified domain (from the DefaultHostName tag) to the alias.

最终用户仍然有一个显示其 AD 用户别名的灰色收件人:字段,但是当他们设置订阅以通过电子邮件发送报告时,在执行时 SMTP 服务器将指定的域(来自 DefaultHostName 标记)附加到别名。

I didn't want to go with the work-a-round specified in the previous answer as I did not want end users to be able to specify any email address.

我不想使用上一个答案中指定的工作循环,因为我不希望最终用户能够指定任何电子邮件地址。

This worked for me in SSRS for SQL 2008 R2. Documentation from Microsoft here (http://msdn.microsoft.com/en-us/library/ms157273.aspx#bkmk_email_extension)

这在 SSRS for SQL 2008 R2 中对我有用。来自 Microsoft 的文档(http://msdn.microsoft.com/en-us/library/ms157273.aspx#bkmk_email_extension)

N.B. make sure you turn of the reporting services process before changing the file, after making and saving the changes, start the process back up.

注意,请确保在更改文件之前关闭 Reporting Services 进程,在进行并保存更改后,启动该进程备份。

回答by Dan M

I added to gbn's version of the solution.

我添加了 gbn 版本的解决方案。

1.Open RSReportServer.config with a text editor.

1. 使用文本编辑器打开 RSReportServer.config。

2.Set SendEmailToUserAlias to True. (So the To: is not blank)

2.将 SendEmailToUserAlias 设置为 True。(所以 To: 不为空)

3.Set DefaultHostName to the Domain Name System (DNS) name or IP address of the SMTP server or forwarder.

3.将 DefaultHostName 设置为 SMTP 服务器或转发器的域名系统 (DNS) 名称或 IP 地址。

4.Save the file.

4.保存文件。

This version will show your alias in the To: section and the email will go through now.

此版本将在 To: 部分显示您的别名,电子邮件现在将通过。

回答by Chris

This works fine.

这工作正常。

Just to let you know the file is in the following location (save you looking for it). RSReportServer.configis located in the %Program Files%\Microsoft SQL Server\MSSQL.n\Reporting Services\ReportServerfolder

只是为了让您知道该文件位于以下位置(省去您的查找)。 RSReportServer.config位于%Program Files%\Microsoft SQL Server\MSSQL.n\Reporting Services\ReportServer文件夹中