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 thoughts on “SQL Server 2005 Reporting Services ReportViewer Control and IE7”
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.
how to call the SSRS(Sql server Reporting services )in Report viewer ctrl in VS 2005
Thanks for the great post. I have been looking for this for a long time.
This explains it. It took me a while to track down that the issue was in IE7. Thanks for a great post.
Thanks. It worked perfectly
Thanks. I use the tweak 1 and 2 and work OK.
Thanks so much for explaining this so well. It saves me HEAPS of time. Really appreciated.
Not Working 😦 please help in fixing 2 scroll bar issue for IE6
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.
how will i know that
in layout section i have
i am also using this in head tag
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.
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
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.
I am also facing the same problem….
May I contact you as we both are working on SSRS.
firstname.lastname@example.org mail me
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..
Hi Sujanakar…..plz check ur mail box….
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.
How/where do I set the default width of the ReportViewer control to be “page width” instead of 100%?
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.
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.
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
Thak you for this useful article
What are the implications of removing the doctype from the header? Will this cause other issues? Just wondering…
Clay, We haven’t found any side effects from removing the DocType.
Please remove height and width for reportViewer. Then
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.
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:
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!
Setting height property to “400px” worked for me. As mentioned in the http://www.eggheadcafe.com/software/aspnet/27965101/re-problems-setting-webf.aspx
How to bring back the progress icon in report viewer in asnc=false mode..
Thanks in advance
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.
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.
can u help me abt reporting services
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.
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
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.
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.
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. 🙂
Can we hide reportviewers’ scroll bars n use div to scroll through report
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
Thanks a lot. It really helped me.
It will work for all of you 😀
Where do you add this code? I tried the load, but I get errors. Please help, I think this would solve my problem
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
Five hours of my life wasted, searching for this. Thanks!
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…..
Thanks Sovled a lot.
Read the problems and complete details about rendering issues and report viewer here.
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.
no need to remove doctype and set asyncrendering thing. just add the following code in your code behind.
it resolves your problem in IE7
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.
Excelent help, thanks