VS2005 Report Viewer bug

  • Thread starter Thread starter Chris Botha
  • Start date Start date
C

Chris Botha

I have a Report Viewer control on a Web page. I want the control to size
automatically as the Web page sizes, so I've set the control's width
property to 90% and the height property to 90% as well. When the Web Page
loads, the report shows blank. It does not show blank in the following two
cases:
If I set the height to a fixed value, for example 500px.
If I add Java Script to the page to size the height of the control (which
renders as a DIV) to 90% after the page is fully loaded. This is my
work-around for the time being.
 
I am having the exact same problem as you and have yet to find a solution.
If so, I'll let you know.
 
If your report viewer is close to the top of the page (no other controls
above it), by adding the following Java Script right at the end of the page
in Source view renders OK for me, that is if your viewer is named
"ReportViewer1":
<script language=javascript>
var theDiv = document.getElementById("ReportViewer1");
theDiv.style.height = "90%";
</script>
 
Thank you for the quick response. Unfortunately, that did not work for me.
The report is workng as I can see the html source for it, but nothing is
displayed. it still appears as though the ReportViewer control is swallowing
the % width and heighth settings. The source still showed their default of
400px.

I have created a new messags using my MSDN account in hopes that an MS
person can help me.

Thx!
 
Back
Top