简体   繁体   English

SSRS:在SSRS报表查询中使用临时表

[英]SSRS: Using temp tables in the SSRS report query

I have an SSRS query that uses temp table and a select statement that returns output , when i try to modify the query and refresh the fields in the Dataset properties window i get following error 我有一个使用临时表的SSRS查询和一个返回输出的select语句,当我尝试修改查询并刷新“数据集属性”窗口中的字段时,出现以下错误

"Could not update the list of fields for the query.Verify that you cannot connect to Datasurce and that your query syntax is correct". “无法更新查询的字段列表。请验证您无法连接到Datasurce并且您的查询语法正确”。 I am able to connect to datasource and I was able t execute query in sql server management studio . 我能够连接到数据源,但无法在sql server management studio中执行查询。 I could see all the fields of report are appearing , but unable to refresh. 我可以看到报告的所有字段都出现了,但是无法刷新。

My question is can we use temp tables in report query (where Query Type : text) in Dataset properties Window ? 我的问题是我们可以在数据集属性窗口的报表查询(其中查询类型:文本)中使用临时表吗? Will it work 它会工作吗

I was also able to build report successfully this means my fields are refreshed ? 我还能够成功生成报告,这意味着我的字段已刷新?

I think the error you're seeing is because SSRS is trying to determine the shape of the query output without running the query, which means the temp table doesn't exist. 我认为您看到的错误是因为SSRS试图在不运行查询的情况下确定查询输出的形状,这意味着临时表不存在。 You might try previewing the query in SSRS and then see if you can update the fields list. 您可以尝试在SSRS中预览查询,然后查看是否可以更新字段列表。

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

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