Thursday, April 3, 2008

Reporting Services & IE7 scrolling issue

All the reports that I'd developed were working fine till the time they were tested on my PM's machine with Vista & IE7. On the spot, I was able to convince him that this is something specific to Vista and hence will need some more work (I could get off very easily with this).
But when I installed IE7 on my machine it was giving the same weird behaviour.. the columns to the right were not showing up.

Then I found this link: http://arcanecode.wordpress.com/2007/11/29/sql-server-2005-reporting-services-reportviewer-control-and-ie7/
(I know everybody looking for this issue will get this link prior to getting to my page; but just in case their site is scrapped then I got a chance). So, I'll repeat the steps (copyright remains with the original publisher I don't want it: This is my disclaimer).
a.) Remove the DOCTYPE tag in it's entirety from the ASPX page. Those with master pages don't have to worry. It won't be there.
b.) Set the AsyncRendering property to False for the ReportViewer control on aspx page. This is True by default. This did the trick in my case.
c.) Make sure the width of the ReportViewer control is set to 100% and remove any references to height property.

I needed to do only the second point as the 3rd was already done and 1st was not required because my page is a content page contained within a master page.

Hope this helps somebody someday!
Cheers (not of the weekend kinds)

UPDATE:
I noticed later that carrying out the above changes played havoc with my page layout. The text was getting out of the intended place and all.
So, to correct that I removed the width=100% and set it to a specific pixel width(against what's advised in the link above) I got everything corrected and received the scroll bars as well. After that I reset the "AsyncRendering" to "True" and it was still working fine. Can't explain for sure as to why it's so; but the only thing I've changed when I was getting the error and the correctly showing page is
a.) specifically set the "AsyncRendering" to "True", and
b.) removed the width=100% that was there earlier to a specific pixed width value.

Hope this helps somebody else as well.

No comments: