SQL Server 2005 Reporting Services ReportViewer Control and IE7

I’ve spent the last few days pulling my hair out over an issue with my reports rendering correctly inside and ASP.Net page and IE7. Like many companies we are preparing to roll out Internet Explorer 7 to all of the desktops. As part of that we’re doing regression testing on our applications, and in doing my tests uncovered an issue with IE7 and our BI (Business Intelligence) solution. It is an ASP.Net 2.0 page that uses the Report Viewer control to display SQL Server 2005 Reporting Services reports.

In IE6, everything has been running fine, reports rendering correctly and users happy. In testing for IE7, we found the reports only drew enough to fill up the available space inside the browser, and then stopped. No scroll bars, and if you resized the browser it did not paint the interior correctly.

The solution, as it turns out was pretty obscure. A co-worker found a thread at http://www.eggheadcafe.com/software/aspnet/27965101/re-problems-setting-webf.aspx that put me on the correct track. The solution needed three minor tweaks to our code.

First, you need to remove the DOCTYPE line from your aspx page. Yes, that’s correct, the line that is automatically inserted when you create a new page. It should look like:

<!DOCTYPE html PUBLIC “~//W3C//DTD XHTML 1.0 Transitional//EN” "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Find it and delete it.

Next, on the ReportViewer control, make sure the AsyncRendering property is set to False. When you set it to true (the default) the report did render correctly, but instead of using the entire webpage to scroll it put another scroll bar onto the report viewer itself, and you had to use it to move through your report. Our testing found having two scroll bars (one for the page and one for the report) to be a bit confusing to the users. Try it both ways though and see what works best for you, as your mileage may vary. For us, we went with False as the setting.

In examining the AsyncRendering property, I found this article on MSDN which further confirmed the need to remove the DocType: http://msdn2.microsoft.com/en-us/library/ms252090(VS.80).aspx

In the final tweak, I made sure to set the width of the ReportViewer control to 100% and removed any setting of height. This allowed the page to scale automatically to the size it needed to be.

Since this was not an intuitive fix, I’m hoping getting the word out will help others and save them the two weeks of frustration I went through.


53 Responses to “SQL Server 2005 Reporting Services ReportViewer Control and IE7”

  1. ActiveEngine Sensei Says:

    Great post. We implemented SQL Report Services last year in and were amazed at how well we adapted to it.

    But despite its good aspects it has those weird failings that are near show stoppers like the “Select All” parameter problem that was in version 1.0, fixed one way in the next release with no real announcement. We had gone to the trouble to rig our stored procedures for the work around in 1.0 to only have to undo it with the patched version.

    Thanks for the post – this will prep for our IE upgrade.

  2. mak Says:

    how to call the SSRS(Sql server Reporting services )in Report viewer ctrl in VS 2005

  3. Arun Says:

    Thanks for the great post. I have been looking for this for a long time.

  4. Dan Schwarz Says:

    This explains it. It took me a while to track down that the issue was in IE7. Thanks for a great post.

  5. Somya Says:

    Thanks. It worked perfectly

  6. Alex Angulo Says:

    Thanks. I use the tweak 1 and 2 and work OK.

  7. Tracey Hemley Says:

    Thanks so much for explaining this so well. It saves me HEAPS of time. Really appreciated.

  8. lakshmi Says:

    Not Working 😦 please help in fixing 2 scroll bar issue for IE6


  9. arcanecode Says:

    lakshmi – do you have a max height property set on the report viewer control? If so that may be the problem, remove it and just leave it blank.


  10. lakshmi Says:

    how will i know that
    in layout section i have
    height 450px
    width 107%

  11. lakshmi Says:

    i am also using this in head tag

    html,body,form {height:105%}

  12. arcanecode Says:

    lakshmi I assume you mean layout section for your control. If so the height is the problem, remove the 450px. Actually you should probably remove all your fixed height / width settings and let the browser size it for you.

    Follow my instructions in the post and it should take care of the issue.

  13. lakshmi Says:

    got it fixed partially…if i use asynredenring to false .. it becomes difficult to move within reports by passign multiple weeks as parameter within the same aspx page. but wen i set it to true the above issue issue is solved but i get 2 scroll bars. so i hav my reports very small on pages now

    plzzz help me i hav a demo on monday

  14. Priya Says:

    I have Master Pages, in which i have DOC tag, and it has banners. I have deleted them.Also I have added the AsyncRendering as false and have given the height and width too.. Now am getting two Scroll bars for each Horizontal and Vertical., one pair for the report and other for the banner and the rest background..which is a bad designing.confused totally.Please make it clear for me.Please help me.

  15. lakshmi Says:

    Hi Priya,

    I am also facing the same problem….
    May I contact you as we both are working on SSRS.

    klakshmi2001@gmail.com mail me

  16. Sujanakar Says:


    I am using Report Viewer control to show SSRS reports on my web page. I implemented Asynchronous rendering and I am facing the issue of 2 scrollbars for each Horizontal and vertical scrollbar.

    plzzz help me in implementing Asynchronous rendering..

  17. lakshmi Says:

    Hi Sujanakar…..plz check ur mail box….

  18. lakshmi Says:

    hi, is der a way in SSRS to display the label on graph only when mouse is moved on the line graph’s point. should remain hidden otherwise on the line graph. shldnt make the graph look clumsy with all label points getting displayed at a time.

  19. mark Says:

    How/where do I set the default width of the ReportViewer control to be “page width” instead of 100%?

  20. Jason Says:

    Hi, i’m not sure if this is a problem related to IE7 or if it’s being caused by something else. I can view my report within the ReportServer reports directory by browsing. However, when i try to display the report in a ReportViewer control, the entire control appears blank. The space is still occupied but nothing seems to be rendered within this blank space (not even the toolbar or scrollbars).

    I am quite certain that the control is connecting with the report (rdl) on the server successfully but not sure where to go from here. Any advice would be greatly appreciated. Thanks.

  21. Jason Says:

    Looks like i was able to resolve this problem. It turns out that i had the ShowCredentialsPrompt attribute set to false and was therefore unable to view the report. After setting this attribute to true, I was able to enter the datasource credentials (SQL Server login) and access the report.

  22. karimahta Says:


    This is probably happening because your datasources on Report Server are set to use a Trusted Connection. When browsing through the web, especially when your site allows Anonymous User access, you usually won’t have the right credentials to access SQL Server.
    To prevent the Windows Security prompt from appearing, go into Report Services manager through SQL Server Management Studio and set the datasources for your report to use a SQL login instead of Windows Security. Then your report can access it’s data and you won’t have to type your credentials in all the time.
    You may also need to set up the BUILTIN\Users group to have browser privileges on the Report Server. If the report server is on another machine than the web server, you will have to do a bit more work

  23. kittiphong Says:

    Thak you for this useful article

  24. clay Says:

    What are the implications of removing the doctype from the header? Will this cause other issues? Just wondering…

  25. arcanecode Says:

    Clay, We haven’t found any side effects from removing the DocType.

  26. Sreekanth Says:

    Please remove height and width for reportViewer. Then
    with using javascript function on “onload” for the form in which we have ReportViewer to set the height and width for ReportViewer.

  27. ic0n Says:

    Guys, this isn’t an issue with ie7, its an issue with ie6. ie6 runs in “quirks mode” by default. adding the transitional dtd to the header will force the browser into “standards mode” which causes the browser to interpret the css standards quite a bit differently, therefore render incorrectly. this issue is with the code being generated by srrs. your solution in any “real” web environment would remove the strict parsing of css and immediately defeat any standards effort being made.

  28. Patrick J Collins Says:

    Thanks Robert Cain for the original post, this one has helped me out. Unfortunately the fix only works in IE, for in Firefox the reportviewer does not expand to occupy the entire height. Any suggestions?

    @ic0n : I don’t believe the problem is specific to IE6, I experienced the same thing in IE7.

    @Sreekanth : I tried using jquery to adjust the reportviewer height on page load, however this didn’t have the desired result, as the report parameters would push the page down, resulting in the dreaded double scrollbar. Here’s the code I tried:

    $(“#ReportViewer1”).css(“height”, $(window).height());

  29. DennisXu Says:

    Thank you so much! It cost me two whole days to try to figure this out and I almost killed myself—because everything was working perfectly until two days ago I updated my system.

    Now I could have a good rest on the weekend!

  30. Mamta Malkar Says:

    Setting height property to “400px” worked for me. As mentioned in the http://www.eggheadcafe.com/software/aspnet/27965101/re-problems-setting-webf.aspx

  31. arvind Says:

    How to bring back the progress icon in report viewer in asnc=false mode..
    Thanks in advance

  32. Ritesh Says:

    I am also facing the same thing as asked by Arvind. Progress icon when asnc mode is set to false.
    In addition to this the multivalue parameter dropdown is not displayed aligned with the dropdown box where as the same is displayed somewhere in middle of the report viewer.
    Please help me out in these issues.
    Thanks in advance.

  33. Satya Says:

    Hi all,
    i am using reporting services first time,
    i developed some reports and published them to our db server,which is seperate from application server.
    the problem is i am getting error when invoking from application server.
    plz help me
    thanks in advance.

  34. Ram Says:

    Hi all
    can u help me abt reporting services

  35. arcanecode Says:

    Satya, I’ll bet you have a security issue. Your report server is probably not setup correctly to recognize the application server as an authorized user of the report.

    Ram, need more details before we can help.

    To the other guys not sure about progress icon, will have to play around with that.

  36. Satya Says:

    Hi All,

    I want to do my backup procedure automate by creating sql job and want to store in a Folder.
    This process I have to do daily twice but my problem is its executing successfully for first time but for second time
    its saying that the given jobname aleady exists.
    SO how i can dynamically change backup file name and job name.
    or else is there any other way for taking backup in recurring process by executing single job.
    plz help ASAP
    thanks in advance


  37. Tony Says:

    Hi arcanecode,

    When I set the AsyncRendering property to False, the ReportViewer control displays some css rendering text just above the SSRS report (I’m using remote mode). When I change the property back to True, the css text disappears.


  38. Adam Says:

    Ok, so what about this problem… I have a report viewer on a asp.net 2.0 page. This page uses a master page which contains: “”.

    I am having this problem where the control it taking up the page appropriately, however, the report is not taking up the control. The report seems to only put 20 characters to a line. If you export the report, it looks fine, it is just in the display inside the report viewer.

  39. Hari Gopal S A Says:

    dear friends,
    I have found a solution to this issue of report viewer control when you set the asynch rendering property to true. Infact when I used the control in my page it showed some weird behaviour. I used two controls in a tr, and the page just got a scroll bar and the page width increased to the length of the report. So I just checked out the rendered html and found that the rendered HTML was not proper, it had many divs and tables. Then I applied the “table-layout=fixed” property to the containing div, and voila it worked. 🙂

  40. Nitasha Says:

    Can we hide reportviewers’ scroll bars n use div to scroll through report

  41. sendil Says:

    Am using Reportviewer control I had 2 scroll bars one for reportviewer and another one for broweser ,
    to overcome tat i mentioned for asynchronous rendering now the scroll bars gone,
    but due to tat when we click view report loading images is not displayed and header part of the report alignment is totally changed in only in IE7

  42. Ronaldo Canesqui Says:

    Thanks a lot. It really helped me.

  43. Asif Nisar Says:

    It will work for all of you 😀

    ReportViewer1.Style.Add(“margin-bottom”, “26px”)


  44. Pinging Says:

    Thanks A Million!!! I was not able to deliver my reports because of the scrollbar and we had revised client deadline by 3 days because of it… This post was a life-savor

  45. Manuel Daponte Says:

    Five hours of my life wasted, searching for this. Thanks!

  46. Saswati Says:

    I want to display a parameter value in the report…..
    The value id showing in Reporting Service…. but its not showing in web page….. What to do for that…..

  47. Hemant Patidar Says:

    Thanks Sovled a lot.

  48. Praveen Says:

    Read the problems and complete details about rendering issues and report viewer here.

  49. Rocky Says:

    Has microsoft lauched new plugins or patches for sql server 2005 reporting services to resolve the horizontal bar problem in IE 7 as it works great in IE6? Please help as I have tons of pages to change, as too many pages involves reportviewer control in my application.

    Thanks for your help in advance.

  50. Suria Prakash Says:

    no need to remove doctype and set asyncrendering thing. just add the following code in your code behind.

    it resolves your problem in IE7

  51. how to make followers on twitter Says:

    You can definitely see your skills within the work you write. The world hopes for even more passionate writers like you who aren’t afraid to mention how they believe. Always follow your heart.

  52. Raul Says:

    Excelent help, thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: