Wednesday, March 28, 2012

Netscape and Firefox

When I open a .NET report viewer in Netscape or Firefox, the report is compressed to a small sliver on the left hand side of the screen. However, the report displays properly in Internet Explorer.

Is there special code that I have to put in place to get a report viewer to display properly in netscape or firefox?

I found there were two problems with rendering reports in Firefox:
1. The vertical area was limited on the screen.
2. All the columns were compacted to slivers on the left hand side of the page/screen (what you are seeing).

The fix to the first problem was a simple CSS patch that I found curtsey of Jon Galloway's weblog (http://weblogs.asp.net/jgalloway/archive/2006/09/01/SQL-Reporting-Services-_2D00_-CSS-fix-for-Firefox.aspx)

The fix for the second issue is even more kludgey:
I added a transparent rectangle with a height of .01 in. to the header and footer of my report and sized it to stretch across the entire width of the report. This forces the renderer and browser to reevaluate the width of the columns in the tables. The catch: the rectangle cannot touch any other items on the report so it adds more vertical height to you reports.

Hope this helps.

No comments:

Post a Comment