简体   繁体   English

Sharepoint Integrated SSRS报告Excel导出失败

[英]Sharepoint Integrated SSRS report excel export fails

When trying to export a report to excel, the web site loads for some time and I am getting "This page can't be displayed. Make sure the web address is correct" error. 尝试将报告导出到excel时,网站加载了一段时间,并且出现“无法显示此页面。请确保网址正确”错误。

Here are some platform details: 以下是一些平台详细信息:

  • SQL Server 2012 with SP2 SQL Server 2012 SP2
  • Sharepoint 2013 共享点2013
  • SS Reporting Services with Sharepoint Integrated Mode 具有Sharepoint集成模式的SS报告服务
  • Windows Server 2012 R2 Windows Server 2012 R2

The report itself has 4-5 parameters, calling some views and one procedure, and displays 120K rows with 30 columns max. 报告本身有4-5个参数,调用了一些视图和一个过程,并显示了12万行,最多30列。 The whole report without filtering can execute in about 7 seconds in SSMS. 无需过滤的整个报告可以在SSMS中执行大约7秒钟。 SP website can display the results of rdl just fine, report displays fine and fast enough. SP网站可以很好地显示rdl的结果,报告可以足够好且快速地显示。 I can also export the results to csv, xml, all 120K rows of it. 我还可以将结果导出到csv,xml及其所有120K行。 But when it comes to exporting to excel, it gets stuck. 但是,当要导出到excel时,它会卡住。

Now this is where it gets funny. 现在,这变得有趣了。

When called with some parameters or date filtering, the report comes out nice and easy and can be exported to excel without delay. 当使用某些参数或日期过滤调用该报表时,该报表将变得非常简单,方便,并且可以立即导出到excel。 I have tested with increasing number of rows and excel export works fine up to some 50K rows. 我已经测试了越来越多的行,并且excel导出可以很好地处理多达5万行。 The exported xlsx file is around 9MB. 导出的xlsx文件约为9MB。 But when I increase the date range, excel export is timing out. 但是,当我增加日期范围时,excel导出就超时了。

Now on to the things I tried. 现在继续我尝试过的事情。

Exporting to other formats work fine. 导出为其他格式可以正常工作。 Just EXCELOPENXML is not working. 只是EXCELOPENXML无法正常工作。

Increasing the values of ProcessTimeout , ProcessTimeoutGcExtension and even adding DatabaseQueryTimeout keys in rsreportserver.config did not help. 增加ProcessTimeoutProcessTimeoutGcExtension的值,甚至在rsreportserver.config中添加DatabaseQueryTimeout密钥都无济于事

Increase the values of executionTimeout and maxRequestLength keys in web.config also had no effect. 增加web.config中executionTimeoutmaxRequestLength键的值也无效。

I restarted Reporting Server services after config changes. 配置更改后,我重新启动了Reporting Server服务。

I suspected the 10MB excel export bug in SQL 2012 but that should be resolved with SP2 which is applied in this system. 我怀疑SQL 2012中存在10MB excel导出错误,但应使用此系统中使用的SP2来解决。

Also related, few minutes before displaying the error message, web site asks for a re-login to sharepoint site. 同样相关,在显示错误消息之前的几分钟,网站要求重新登录到SharePoint网站。 That happens after a couple of minutes of hitting the excel export. 这是在达到Excel出口几分钟后发生的。 I want to make sure everything is what is supposed to be in sql side before making any IIS config changes. 我想确保在进行任何IIS配置更改之前,一切都应该在sql端进行。

Any ideas? 有任何想法吗?

A few days of trial and error later, I've found the cause of this issue. 经过几天的反复试验,我找到了造成此问题的原因。

The problem was in a column with an action property of "Go to URL" and the url was set by string concatenation expression, taking 4 parameters from the report fields. 问题出在动作属性为“转到URL”的列中,并且该URL是由字符串连接表达式设置的,并从报告字段中获取4个参数。 Apparently SSRS processes all few hundred K's of data all over again while exporting to excel. 显然,SSRS在导出到excel时会再次处理所有几百个K的数据。 The reason why csv and xml formats were able to process the same report, but excel throwing the timeout remains a mystery to me. csv和xml格式能够处理相同的报告,但擅长抛出超时的原因对我来说仍然是个谜。 All I can speculate is that excel renderer requires more process time to format the cells. 我只能推测excel渲染器需要更多的处理时间来格式化单元格。

Another way to solve the issue might have been enabling the report snapshot, so report data would be consumed from the cache but I'm not sure excel export would still re-process the report or not. 解决该问题的另一种方法可能是启用报表快照,因此报表数据将从缓存中使用,但是我不确定excel导出是否仍将重新处理报表。

I solved the issue by adding another column with the same data, but adding the expression below to column visibility property: 我通过添加另一列具有相同数据的列解决了该问题,但将以下表达式添加到列可见性属性中:

=(Globals!RenderFormat.Name="EXCELOPENXML")

So now, the string operations with the parameters are successfully processed to form the URL format in web view, but are not processed in excel renderer. 因此,现在,带有参数的字符串操作已成功处理以在Web视图中形成URL格式,但未在excel渲染器中处理。

Hope this helps someone. 希望这对某人有帮助。

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

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