ReportViewer Height issues, again...
I've searched this forum and it looks like several people have similar issues with getting ther report viewer to look correct on an ASP.Net page. I have an ASP.Net app in VS2008, with a master page, and a reportviewer control thatI want totake up the whole area of the content place holder. The relevent code is this: Code Snippet <div style="height: 600px; width: 100%; "> <rsweb:ReportViewer ID="ReportViewer1" runat="server" Height="500px" ProcessingMode="Remote" Width="100%" BorderStyle="Solid" BorderWidth="1px" BackColor="#E3EAEB" SizeToReportContent="True"> </rsweb:ReportViewer> </div> Notice that the border of the reportviewer is set. When the page renders, everything looks OK and you can see the report viewer's border. But when the report is rendered, it bleeds down over the bottomborder. I have fiddled around a lot with the width and height of the report viewer and the div tag. Setting the width to a fixed value doesn't help. Neither does that SizeToReportContent property. Setting the height values to 100% doesn't help either. After looking at this for a long time, I realized that the amount that the report goes over the border is exactly the height of the reportviewer tool bar and parameter section. Interesting. A bug in its calculations? This should be possible I think, because if you look at the report manager web app that you get with SQL 2005, the report viewer area does what we want. I don't think setting AsyncRendering to False is an acceptable solution. Neither do I think taking the DOCTYPE out of the master page is acceptable. I am not going to give up on standards based rendering just for the report viewer. So how do we accomplish this? How did MS get it to look right in report manager? Any developers of that app from MS care to shed some light on this? Thanks,
November 13th, 2008 7:04am

Bumping this. Anyone?
Free Windows Admin Tool Kit Click here and download it now
November 14th, 2008 1:46am

>How did MS get it to look right in report manager?Did you see SSRS 2005 reports in FireFox?Alexei Cioina.My website based in SSRS 2005
November 14th, 2008 6:30am

No, why?
Free Windows Admin Tool Kit Click here and download it now
November 14th, 2008 8:01pm

VB.Net Pro wrote: No, why? Please see http://cid-650b3eaee0996968.skydrive.live.com/self.aspx/Public/ReportInFireFox.jpg
November 14th, 2008 8:57pm

Eww. Not good. I'll be this has to do with the infamous Height parameter that really isn't a parameter of a table. I did a View Source of the Report Manager page and there was no DOCTYPE at the top, which means that IE will use quirks mode, which means it will try to deal with non-standard things, where Firefox will try to stay with standards. I'd be happy if we could figure out the issue of the report contentbleeding over the boundary of the reportviewer control. The fact that the amount it runs over is exactly the size of the toolbars on the top suggests that it is a calculation error. I would just like to know how to get around that.
Free Windows Admin Tool Kit Click here and download it now
November 14th, 2008 9:21pm

<rsweb:ReportViewer runat="server" Height="350" style="margin-bottom:30px;" SizeToReportContent="false" ID="MainReport"/>
December 15th, 2008 5:57pm

I noticed that adding the following (C#) code made the report viewer behave.protected void Page_Load(object sender, EventArgs e){ Response.Write("&nbsp;");}Obviously this isn't a solution becausecreates an unwanted blank line inthe page, but it mightgive a hint to someone what's causing the problem.
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2009 5:20pm

Of course, you can solve the problem of the extra blank line by writing something like the following. protected void Page_Load(object sender, EventArgs e) { //Worksround for a bug displaying report viewer control in a content placeholder Response.Write("<div style=\"display:none\"></div>"); }
July 27th, 2009 11:23am

Brilliant! Hours of frustration! Thank you so much for this solution!
Free Windows Admin Tool Kit Click here and download it now
September 11th, 2009 9:45pm

Awesome! My problem started with the horizontal scroll bar not appearing. It took me a few hours and I figured out the issue was the combined height of the ToolBar and Prompt area caused the report to overrun the reportviewer by that much (thus hiding the horizontal scrollbar). One solution I found was this: reportviewer.Attributes.Add("style", "margin-bottom: 75px;"); //75 = combined height of toolbar and prompt area But that didn't work since users could resize their browser, thus changing the height of the toolbar or prompt area if things needed to wrap. The fix SpeedoJoe came up with works great! thanks! I guess if there was a way to find the toolbar and Prompt area heights, then the other solution I mentioned could work by setting the margin to those, but I couldn't find any properties with that info. protected void Page_Load(object sender, EventArgs e) { //Worksround for a bug displaying report viewer control in a content placeholder Response.Write("<div style=\"display:none\"></div>" ); }
October 8th, 2009 8:05pm

I was able to fix this by adding Height="" to the ReportViewer tag.
Free Windows Admin Tool Kit Click here and download it now
October 8th, 2010 6:19pm

Of course, you can solve the problem of the extra blank line by writing something like the following. protected void Page_Load(object sender, EventArgs e) { //Worksround for a bug displaying report viewer control in a content placeholder Response.Write("<div style=\"display:none\"></div>"); } This worked for me also, what a bug!!
December 13th, 2010 6:17pm

Of course, you can solve the problem of the extra blank line by writing something like the following. protected void Page_Load(object sender, EventArgs e) { //Worksround for a bug displaying report viewer control in a content placeholder Response.Write("<div style=\"display:none\"></div>"); } This works for me thanks....Bhavesh
Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2011 12:24pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics