Report Viewer Control fails to render correctly in IE8

One of our more widely used application uses the Report Viewer Control to render SQL Server Reporting Services 2005 reports.

We are migrating to IE8 in the near future, so it was up to the various development teams to ensure compatibility. It should have been oh so easy :-)

Figure 1 shows the Report Viewer Control correctly rendering, a report is produced with twenty pages. Scrolling to the bottom of the control works as expected.

reportviewerissue003
Figure 1- Application renders correctly in IE6

Figure 2 shows the same page and content in IE8. All looks good until you scroll to the bottom of the report (shown in Figure 3).

reportviewerissue001
Figure 2 - All looks okay in IE8…. however….

reportviewerissue002
Figure 3 - Scroll bar not rendered correctly [circled in red], page number footer missing (it is visible in Figure 1 when rendered in IE6)

There is a workaround for this particular issue. It involves the DOCTYPE markup that you may have in your master page or each individual page.

You can read more information about DOCTYPES at Holly Bergevin’s page: DOCTYPE at Community MX

Removing it completely from your page will make the browser work in ‘quirks’ mode. You’ll find that enabling ‘quirk’ mode will ensure the report is rendered correctly. See MSDN social.

If like me, you’ve got your DOCTYPE in your master page, and you’d really like to keep your XHTML compliant markup in place for the majority of your pages, it is a little more tricky. Either code the DOCTYPE in each page (removing it from your Master page! yuck!)… or find another workaround.

I search in vain for a solution. If you can help, please comment on this article. It seems it is a known bug!

SC




You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

5 Responses to “Report Viewer Control fails to render correctly in IE8”

  1. SpittingCAML Says:

    i’ve logged this as a bug on Microsoft Connect. Find my bug here: Bug 533283

  2. Brian Hartman (MSFT) Says:

    We have received your bug via Microsoft Connect and will be responding through that channel. But I wanted to also add a comment here since this posting is referenced in the bug.

    It’s true that the existing ReportViewer has a number of known limitation with standards mode, including the one you point out here. We’ve made a huge effort to address these issues with Visual Studio 2010. Support for standards mode in general, as well as Firefox and Safari specifically, is greatly improved in this release. I have posted additional information on my blog in the postings linked below. I hope you will be able to try out the changes we have made and provide additional feedback if you continue to run into problems.

    http://blogs.msdn.com/brianhartman/archive/2009/06/18/where-s-the-new-report-viewer.aspx

    http://blogs.msdn.com/brianhartman/archive/2009/10/22/visual-studio-2010-beta-2-is-now-available.aspx

  3. SpittingCAML Says:

    Brian, thanks for taking the time to respond to this bug and for posting here.

    Whilst I understand your point of view on this, the new control would help to resolve this issue, however, we don’t have the luxury to make the transition to a new control at this time, we will have to schedule this upgrade in the future to ensure we test it thoroughly.

    Also, we aren’t using VS2010 just now. DOTNET4 is only just coming out as an RC. The bleeding edge isn’t a safe place when you have demanding customers!

    Some quick questions though:
    Does the new report viewer control interface with SQL 2005?

    Can we use it under Visual Studio 2008?

    thanks again
    SC

  4. Brian Hartman (MSFT) Says:

    I certainly understand not being able to upgrade right away. Changing the doctype is one way to work around the issue. Placing the viewer in an iframe (to isolate the doctype change) is another, though it has a number of potential pitfalls as well, depending on how you use the viewer. You might also consider using SizeToReportContent to remove all scrollbars from the viewer, though this may not be exactly the rendering you want.

    The ReportViewer in VS 2010 is a multi-targeted assembly. So it can be used with .Net 3.5 or .Net 4.0.

    To answer your two questions -

    The Report Viewer in VS 2010 requires SQL 2008 or later in server mode. It depends on a rendering extension that was introduced in SQL 2008.

    You can use the new viewer in VS 2008, but you won’t get the new design time support. That is, you can link to it and use it just like any other external assembly. But you won’t get the updated report designer or related items. Once VS 2010 ships, I believe we will have a redistributable available on microsoft.com. Currently, the redist is included in the VS 2010 beta install.

  5. SpittingCAML Says:

    Brian, thanks again for your quick response. It seems like the transition to a new control might be possible in the near future as it is multi targeted.

    I will pass on your advice regarding SizeToReportContent and using an iFrame, however I suspect these workarounds don’t align with our customer requirements.

    SC

Leave a Reply