ReportViewer is slow on large reports despite ServerReport processing - reporting-services

I have observed performance problems when rendering a 1000-page ServerReport using Microsoft.ReportViewer.WebForms versions 10 and 11 in Visual Studio 2013, running against a SQL Server 2012 Report Server.
This is not a query performance problem, since the underlying stored procedure returns the data in a few seconds. Running the report through the Report Manager returns an HTML or PDF report in 30 seconds. It is only when the report is returned through the Report Viewer that an additional delay of several minutes is encountered. Neither PageCountMode.Estimate nor local processing of the report have helped.
It appears to be a rendering issue. This is unexpected, because the rendering should be happening on the server. The client machines are less powerful than the server, and we do in fact want the server to render the report.

Some of the rendering is in fact being done on the client, despite the fact that this is a ServerReport.
Examination of the ExecutionLog2 view in the ReportServer database shows that an RPL format is returned in, e.g., 30 seconds. However, even though this is a ServerReport, the client then spends several minutes apparently performing additional rendering. There is no additional delay for older versions of the ReportViewer, which receive HTML4.0 instead of RPL. There is also no additional delay when all rendering is performed on the Report Server, as through the Report Manager.
It would be possible to request HTML4.0 format through ServerReport.Render(), except that Render() cannot be called explicitly for a WebForms ReportViewer Control.
For large reports, it would be useful to be able to prevent the client from receiving RPL or performing any rendering. There is a Microsoft Connect item about this.

Related

SSRS Report runs slower in Preview Mode/Report Viewer

I am using Visual Studio 2019 and using Microsoft Reporting Services Projects Extension v2.6.7. The problem i am facing is i have a report that process about 60k records, the report is complex and has Groups, repeat headers, dataset filters and also VB Code.
The stored procedure used for this report runs in less than 10 seconds and when the report is deployed to Report Server the report completes rendering in less than 2 Mins. But when I run the same report using Visual Studio in preview or Run Mode (Report Viewer) the report runs for a whooping 17-20 mins. I have used SQL Profiler and see the Stored procedure execution time is almost same as the report execution time. The stored procedure is designed to handle parameter sniffing issue and I dont see any issue with the procedure.
From the report side, i have tried Keeptogether=false, Interactive size etc that could impact performance. They look fine.
I also tried to add WorkingSetMaximum to increase memory but still no luck. The client i am working with requires to have the RDLC File integrated in their app and will not want to deploy on Report Server for their own reason.
How can i make my report run faster in Visual Studio Preview Mode/Report Viewer (Run Mode) so that I can match the performance of the report with the performance i Get in Report Server.
Also if anyone could tell if there is a difference in how the report rendering works on Report Server vs Preview Mode.
Edit 1 - Report Server and the database is configured in my laptop and it is not having any different configuration.
Edit 2 - Another observation i have gathered by running SQL Profiler is that during Preview mode the connection is kept open and the data retrieval time justifies report run time. Both are same. But when i run the report through report manager from the same machine, procedure completes in seconds and even the report renders faster. And As i have mentioned above, i have taken care of parameter sniffing. I am now trying to understand if there is a difference in the way SSRS Engine treats report rending and data retrieval for Preview and when report is deployed to reporting service.
I came across this Q&A discussion in MSDN. I tried to replicate this and it gave me a fix by changing the trust level for CAS in config file. But still I have a question with regards to how Report Viewer in Visual Studio behaves. Is there any similar setting that we use in the application config that can be used to improve development and test performance in Visual Studio.
MSDN Blog
Use the existing framework but force the use of Legacy CAS [code access security] Security
In Winforms <NetFx40_LegacySecurityPolicy enabled="true" />
In ASP Net application <trust legacyCasModel="true" level="Full"/>

How to find report execution log for visual studio preview of report

I am working on an existing SSRS report. It works when viewed in a browser from the report server (~ 30 seconds load), but loads for quite a while in visual studio preview (~ 10 minutes). The queries themselves are fast, so something about the report specifically is causing the slowdown.
As for what I have tried so far, I tried deleting the cached .data file (no fix), deploying the report (works fine when deployed), recreating the data sources, as well as attempting to avoid bad query plans from parameter sniffing (see Fast query runs slow in SSRS). None of these fix the problem. The problem only happens specifically when using local preview.
Many articles describe viewing the execution log to figure out what stage the report is taking so much time in (query, data processing, rendering). I would like to do this so I can narrow down the cause, but it works fine on the report server, just not on the local preview. How can I get the equivalent execution log when running local preview, given there is no report database?
I suspect that because forcing the query plans to recompile doesn't solve the problem, and because the report works fine with the same query against the same server when deployed, that the actual problem might be some weird rendering bug. I have heard this can happen with certain pagination settings, but I want to confirm what general area this problem is in.

How to improve performance of SSRS PreviewProcessingService while previewing in VS?

Since one of the last Sql Server Data Tools updates for Visual Studio 2013, the preview-rendering has changed drastically.
Installed Version: Microsoft SQL Server Data Tools - enu(12.0.30919.1)
Visual Studio opens a separate process to render the preview-data, without any output or information. This preview-service is so ridiculously slow when displaying large amounts of data.
For a comparison:
A statistical report that displays around 20 pages of static precalculated data is normally rendered instantly when executed in our production environment.
When previewed in visual studio the exact same report may take up to 40-60 seconds to render.
Is there any way to optimize this sub-optimal behavior? Currently I have to change one tiny layout / grouping thing in around 30 reports and the additional rendering time during development adds up a lot.

Executing an SSRS 2012 report cause the browser not to respond

I am using Dynamics CRM 2013 on premise.
I have built all the reports based on stored procedures in SSRS.
one report however, that has no issue with execution definitions, permissions or what ever,
once executed causes to browser to crash (any browser, i tried FF, Chrome, IE9 and up, )
it seems the problem is not a report execution problem but a report rendering problem for this specific report.
I cannot cache the report or make a snapshot of it, as the values of the reports also depends on the user running the report (among other parameters user-defined) and each user should get a different result. - i have more than 400 users.
I have tried searching for any one who had face this kind of issue and reported on it but failed. hence decided to post this question my self.
if anyone has any idea, please share.
thanks
Have you enabled tracing/logging in SSRS? http://msdn.microsoft.com/en-us/library/ms156500.aspx
You might turn on verbose logging while trying to run the report to see if you can get more helpful information.
If you write code, you can write a .NET application that calls the SSRS web services to render the report. Doing that will help you know for certain whether it's a browser rendering issue since you can get back the report as a byte array and save it to disk as Word, PDF, etc.

Microsoft Reporting Services Response time

I have created a report with Report Builder 3.0
I'm running it on Microsoft Reporting services 2012
When O look in the performance logs (via ExecutionLog3) I see that all 3 phases(Retrieval, Processing, Rendering) took about 2 secs. But the browser take 7+ sec to present it (and it is consistent that there is 5-10 seconds overhead), what might be the source of it?
Could be one of two things most commonly:
The problem MAY BE, not sure, that your SSRS server is recycling every 12 hours and the first report of the day may be accessing the catalog on the ReportServer, getting the site up and running and then giving you a report. Generally this is common with SSRS and sometimes may take up to a minute for the first report of the day. Generally you can create a 'keep alive' service to poke SSRS every few hours at http:// (servername)/ReportServer which is SSRS's web service. You can also I have read set a config setting on the SSRS server itself but that never worked for me so I gave up and created a keep alive service instead.
The report can be taking a long time if a developer created a lot of functions on top of the data to render it with font changes, size changes, color changes, dynamic logic. You mentioned 'Rendering' in the time you looked up but if the report is not rendering in the browser how are you seeing rendering happen faster?
Generally it is both of these things in different situations. Best way to check 2 is create a super simple report with no parameters and a simple dataset that returns a black and white grid.