I was searching for some information on the report viewer control, and accidentally stumbled upon something I always wanted, but could not seem to figure out.
A combination of 2 properties will have the control automatically size itself to fit the entire report:
AsyncRendering=false SizeToReportContent=true
The AsyncRendering=false changes the rendering to be in-line instead of a frame, which for whatever reason is required for the SizeToReportContent to work.
A noteworthy side-effect of these settings, is that images that have the “sizing” property set to “AutoSize” do not render correctly. They get shifted and cut off. Changing the sizing to FitProportial cured the rendering problem for me. This was not a property I set myself, so AutoSize must be the default.
May 10, 2008 at 4:18 pm |
I have been looking for this, and I thought that it could not be done!
Great help!
May 28, 2008 at 5:46 am |
justly says : I absolutely agree with this !
September 23, 2008 at 6:13 pm |
Hi:
Thanks a lot for this one, what a big help!!!
Thanks and greets from Bogota!!!
September 24, 2009 at 2:03 pm |
Very nice tip!