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.


January 1, 2008 at 7:01 am
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.
February 5, 2008 at 4:13 am
how to call the SSRS(Sql server Reporting services )in Report viewer ctrl in VS 2005
February 6, 2008 at 6:57 pm
Thanks for the great post. I have been looking for this for a long time.
February 7, 2008 at 2:22 pm
This explains it. It took me a while to track down that the issue was in IE7. Thanks for a great post.
February 8, 2008 at 12:58 pm
Thanks. It worked perfectly
February 12, 2008 at 3:48 pm
Thanks. I use the tweak 1 and 2 and work OK.
March 4, 2008 at 10:25 pm
Thanks so much for explaining this so well. It saves me HEAPS of time. Really appreciated.
March 27, 2008 at 4:48 am
Not Working
please help in fixing 2 scroll bar issue for IE6
plzzzzzzzzzzzzzzz
March 27, 2008 at 5:12 am
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.
Arcane
March 27, 2008 at 5:25 am
how will i know that
in layout section i have
height 450px
width 107%
March 27, 2008 at 5:25 am
i am also using this in head tag
html,body,form {height:105%}
March 27, 2008 at 8:25 am
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.
March 28, 2008 at 4:09 am
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
March 28, 2008 at 5:56 am
Hi,
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.
March 28, 2008 at 7:38 am
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
April 8, 2008 at 4:58 am
Hi,
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..
April 8, 2008 at 8:00 am
Hi Sujanakar…..plz check ur mail box….
April 8, 2008 at 9:33 am
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.
April 15, 2008 at 10:08 am
How/where do I set the default width of the ReportViewer control to be “page width” instead of 100%?
April 28, 2008 at 11:28 am
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.
April 28, 2008 at 11:44 am
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.
April 30, 2008 at 6:34 am
Jason,
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
HTH
May 7, 2008 at 1:08 am
Thak you for this useful article
May 23, 2008 at 10:39 am
What are the implications of removing the doctype from the header? Will this cause other issues? Just wondering…
May 23, 2008 at 8:50 pm
Clay, We haven’t found any side effects from removing the DocType.
June 23, 2008 at 3:37 pm
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.
August 27, 2008 at 3:45 pm
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.
August 29, 2008 at 3:32 am
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());
September 19, 2008 at 12:50 pm
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!
September 26, 2008 at 4:54 am
Setting height property to “400px” worked for me. As mentioned in the http://www.eggheadcafe.com/software/aspnet/27965101/re-problems-setting-webf.aspx
October 3, 2008 at 10:47 pm
How to bring back the progress icon in report viewer in asnc=false mode..
Thanks in advance
Arvind
October 6, 2008 at 9:15 am
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.
Ritesh
November 27, 2008 at 5:40 am
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.
November 27, 2008 at 6:14 am
Hi all
can u help me abt reporting services
November 27, 2008 at 8:08 am
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.
December 2, 2008 at 12:21 am
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
Regards
Satya
January 4, 2009 at 12:21 pm
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.
Thanks.
January 13, 2009 at 9:01 am
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.
February 9, 2009 at 1:32 am
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.
March 5, 2009 at 5:16 am
Can we hide reportviewers’ scroll bars n use div to scroll through report
March 9, 2009 at 5:36 am
Hi,
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
March 26, 2009 at 1:28 pm
Thanks a lot. It really helped me.
April 1, 2009 at 11:17 pm
It will work for all of you
ReportViewer1.Style.Add(“margin-bottom”, “26px”)
Thanks
September 16, 2009 at 2:51 pm
Where do you add this code? I tried the load, but I get errors. Please help, I think this would solve my problem
May 7, 2009 at 4:33 am
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
June 22, 2009 at 11:42 am
Five hours of my life wasted, searching for this. Thanks!
June 25, 2009 at 5:19 am
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…..
July 2, 2009 at 7:45 am
Thanks Sovled a lot.
March 17, 2010 at 2:00 pm
Read the problems and complete details about rendering issues and report viewer here.
http://praveenbattula.blogspot.com/2010/03/fix-to-report-viewer-problems-in-iis-7.html
April 5, 2010 at 1:06 pm
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.
April 5, 2010 at 10:19 pm
no need to remove doctype and set asyncrendering thing. just add the following code in your code behind.
reportviewerid.Style.Add(“margin-bottom”,”30px”);
it resolves your problem in IE7
January 9, 2012 at 3:08 am
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.
January 26, 2013 at 5:09 am
Hi there would you mind letting me know which web
host you’re working with? I’ve loaded your blog in 3 different
web browsers and I must say this blog loads a lot faster
then most. Can you recommend a good web hosting provider at a fair price?
Many thanks, I appreciate it!
February 19, 2013 at 9:45 am
Excelent help, thanks