0

I've a problem with a very simple report that takes 10 minutes to load, even with just a few rows of test data. The preview in the report designer only takes at most a few seconds.

The report uses an embedded XML data source. There is a single data set with a few fields. The data source's query is created dynamically and uses report parameter value as the content of the queries XmlData element. This technique is described in this Microsoft blog post. The XML data parameter is generated dynamically by my application before loading the report.

It seems that each field adds about 30 seconds to the time it takes to load the report. I embed the content directly in the query string (without using parameters) it still takes 30 seconds. Is there another way to load a report using dynamically generated XML data?

kapex
  • 28,903
  • 6
  • 107
  • 121

1 Answers1

0

I haven't found a way to improve the load time with the embedded XML data source. The technique described in the blog post is unusable (at least for SSRS 2008-R2) and should be avoided.

I've switched to a XML file data source that gets its connection string from a parameter, which points to a XML file uploaded on the report server. The file is uploaded using CreateCatalogItem by my application before executing the report. The the URL of that file is passed as parameter when loading the report.

The URL is constructed using the server address and path to the file, it looks like this:
http://127.1.2.3:81/ReportServer?%2fMyXmlData.xml&rs:Command=GetResourceContents

The report loads within a second now.

kapex
  • 28,903
  • 6
  • 107
  • 121