简体   繁体   中英

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.

Here are some platform details:

  • SQL Server 2012 with SP2
  • Sharepoint 2013
  • SS Reporting Services with Sharepoint Integrated Mode
  • 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. The whole report without filtering can execute in about 7 seconds in SSMS. SP website can display the results of rdl just fine, report displays fine and fast enough. I can also export the results to csv, xml, all 120K rows of it. But when it comes to exporting to excel, it gets stuck.

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. I have tested with increasing number of rows and excel export works fine up to some 50K rows. The exported xlsx file is around 9MB. But when I increase the date range, excel export is timing out.

Now on to the things I tried.

Exporting to other formats work fine. Just EXCELOPENXML is not working.

Increasing the values of ProcessTimeout , ProcessTimeoutGcExtension and even adding DatabaseQueryTimeout keys in rsreportserver.config did not help.

Increase the values of executionTimeout and maxRequestLength keys in web.config also had no effect.

I restarted Reporting Server services after config changes.

I suspected the 10MB excel export bug in SQL 2012 but that should be resolved with SP2 which is applied in this system.

Also related, few minutes before displaying the error message, web site asks for a re-login to sharepoint site. That happens after a couple of minutes of hitting the excel export. I want to make sure everything is what is supposed to be in sql side before making any IIS config changes.

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. Apparently SSRS processes all few hundred K's of data all over again while exporting to excel. The reason why csv and xml formats were able to process the same report, but excel throwing the timeout remains a mystery to me. All I can speculate is that excel renderer requires more process time to format the cells.

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.

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.

Hope this helps someone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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