简体   繁体   English

SSRS - 报告网站错误处理数据集

[英]SSRS - Report Website Error processing Dataset

After adding a T-SQL query-based dataset to a report and deploying it, the report stopped working because of the following error. 将基于T-SQL查询的数据集添加到报表并进行部署后,由于以下错误,报表停止工作。

An error has occurred during report processing. 报告处理期间发生错误。 (rsProcessingAborted) Query execution failed for dataset 'NewDataset'. (rsProcessingAborted)数据集'NewDataset'的查询执行失败。 (rsErrorExecutingCommand) For more information about this error navigate to the report server on the local server machine, or enable remote errors (rsErrorExecutingCommand)有关此错误的详细信息,请导航到本地服务器计算机上的报表服务器,或启用远程错误

Datasource : Cube + SQL DB Dataset: Cube + SQL DB 数据源:多维数据集+ SQL DB数据集:多维数据集+ SQL DB

Table on the report: Most columns filled from Cube DB. 报表上的表格:大多数列都来自多维数据集DB。 Added one more column connected T-SQL DB. 添加了一个连接T-SQL DB的列。

Before adding T-SQL dataset, report was showing perfectly on the site. 在添加T-SQL数据集之前,报告在网站上显示完美。 The SSRS previews report perfectly. SSRS完美预览报告。

The report uses a shared dataset that connects to a SQL shared datasource. 该报告使用连接到SQL共享数据源的共享数据集。

Often, dataset queries will fail when deployed due to security problems. 通常,由于安全问题,数据集查询在部署时将失败。 Ensure that the account that the SSRS reports run under have the appropriate security for all of the db objects used in the dataset query. 确保运行SSRS报告的帐户对数据集查询中使用的所有db对象具有适当的安全性。

Find the data source in the Report Manager. 在报表管理器中查找数据源。 Click the down arrow located on the right side of the data source and choose "Manage". 单击位于数据源右侧的向下箭头,然后选择“管理”。 In the properties, you can determine what account is used to connect to SQL. 在属性中,您可以确定用于连接SQL的帐户。

On the SQL database, ensure that the account used for the data source has the security privileges required to access the database objects used in the query (maybe the tables referenced in the query, or the stored procedure, depending on what the source of your dataset is). 在SQL数据库上,确保用于数据源的帐户具有访问查询中使用的数据库对象所需的安全权限(可能是查询中引用的表或存储过程,具体取决于数据源的来源)是)。

Try connecting to SSMS with the same account that the data source is using, and run the same query. 尝试使用与数据源使用的帐户相同的帐户连接到SSMS,然后运行相同的查询。 The errors that you get during this process will help identify where security privileges are needed. 您在此过程中获得的错误将有助于确定需要安全权限的位置。

In my case with the same error message, the root of the issue is not from the security perspective, but from the database view related to the report. 在我的情况下,使用相同的错误消息,问题的根源不是从安全角度,而是从与报表相关的数据库视图。 Here's how I found out: 这是我发现的方式:

  1. Run the same report from Report Builder: from Report Manager, click the report that produces error. 从报表生成器运行相同的报表:从报表管理器中,单击生成错误的报表。 You might have to provide additional parameters depending on your report, then click View Report 您可能必须根据报告提供其他参数,然后单击“查看报告”
  2. You should now see the same error message. 您现在应该看到相同的错误消息。 The content of the message is the same in the first sentence; 消息的内容在第一句中是相同的; but the second sentence on it will show in more detail the cause of the error. 但其上的第二句将更详细地显示错误的原因。 In my case I have a view that queries columns not existing (because I deleted) in the table. 在我的情况下,我有一个视图,查询表中不存在的列(因为我删除了)。 When I update the view, it works again with the report. 当我更新视图时,它再次与报告一起工作。

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

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