VisualStudio Report Viewer not rendering report body in Chrome
Asked Answered
P

3

7

I'm aware that Chrome is not supported - http://msdn.microsoft.com/en-us/library/ms156511.aspx for the Report Viewer.

The solution here has not worked for me ReportViewer problem in google chrome unfortunately

In our case the report body is blank. I have come across solutions to report height issues and distortion issues in the tool bar but in my case I have yet to get to that stage.

When I navigate to the Report Manager in Chrome I can see my reports [They are not perfect but are at least showing the report body]

http://localhost/Reports_SQLSERVER2008/Pages/Report.aspx? [clipped]

I have 2 questions wrt this issue and I hope someone will be able to shed some light on them.

  1. Why would the report viewer in the Report Manager render the report body in Chrome while the VS 2010 Report viewer control will not. [Leads me to believe that the Viewer can render in Chrome so it may be something I can change].
  2. Is it possible to extend the Report Viewer to at least render the body in Chrome.

All other browsers are fine. Its an ASP.Net 4.0 web form app using the VS 2010 version of the report viewer on SQL Server 2008 [Moving to 2008 R2 in a short while].

I'm at the stage also where it may be the case that the effort required to resolve this issue cannot be justified. I expect there may be other problems such as parameter selection etc. I'd like to hear your thoughts.

Thanks in advance,

Rgds,

Liam

Pelson answered 17/6, 2011 at 12:27 Comment(0)
P
11

This is the fix that worked for us but is specific to our implementation.

We have the ReportViewer wrapped in a user control and this report viewer user control is used in 2 places in our Asp.Net app.

  1. On a basic Reports page
  2. On a webparts [Dashboard] page. Each web part contains a Report Viewer user control.

In the markup of the Report Viewer user control we set the height of the Report Viewer to a large number in Pixels. i.e. 1200px. The report body renders in Chrome on the reports page and on our dashboard page.

As the reports page displays 1 report at a time the height setting is not an issue

In the dashboard we already expose a personalisation property of the webpart containing the report path which allows us to load what ever report we require. We also expose a new property to store the hieght of the report in the personalisation framework and this in turn sets the height of the report viewer as required by the user.

Liam

Pelson answered 1/7, 2011 at 13:25 Comment(1)
Thanks - I appreciate that you came back and answered your own question. :)Chevalier
B
7

I experienced the same problem: a blank body. Only the toolbar was visible. Using browser developer tools, I was able to find out that if I put an height of 1000px on the div that contained the report viewer, the content would be become visible.

Then, I found a property SizeToReportContent, which, if set to True, makes the content render correctly.

This property is available in the ReportViewer control in Microsoft.ReportViewer.WebForms, Version=10.0.0.0. I use local reports.

Bellanca answered 6/8, 2013 at 8:55 Comment(1)
Works for me! Tell you that it already had asyncrendering = "False" as Andrew says. Comment that before solving the error in the chrome console an error appears in the MicrosoftAjax.js script with the text "Cannot read property 'constructor' of undefined"Octogenarian
G
1

The fix that worked for me was setting: asyncrendering="False"

Goebbels answered 13/12, 2013 at 3:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.