When using reportviewer control on the web page. By default, the reportviewer has a fix width and height to 400px. But how do we change the value of width and height?
The answer I get from some forums, some said that set ZoomMode=”FullPage”, some recommended to set SizeToReportContent=”true”. Even with the 2 suggestions, I still cannot solve the problem.
The final answer I get it works is:
<rsweb:ReportViewer Width="100%" SizeToReportContent="true" AsyncRendering="false" … ></rsweb:ReportViewer>
AsyncRendering=”false” is the key. It will render inline HTML instead of using IFRAME. I have tested it from Internet Explorer 7.0, Firefix 3.0 and Google Chrome. :)
Be careful when setting the AsyncRendering property. Check out the explanation from http://msdn.microsoft.com/en-us/library/ms252090%28VS.80%29.aspx
Good luck and happy programming!
Answer from: http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server-reporting/15508/ReportViewer-control-and-scaling-issue






Post a Comment