Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Set CrystalReportViewer.Zoom level before form is visible

$
0
0

Hi,

 

I am trying to set the CrystalReportViewer Zoom level on all my reports to 2 (whole page) but only seem to be able to get this to work once the form has been fully loaded and visible to the user. The problem is that the form either needs to load up with the correct size in a set location or in a maximised state, however, the only way to get the Zoom to work is to load up the form with the wrong size then change that size to the correct one once it has fully rendered (which only seems to be once the Form.Activate event is fired).

 

If the form was to load up using just the predefined size set at design time then everything works as expected, i.e. set the .ReportSource then call .Zoom(2) and it loads correctly. However, any attempt to set the size of the form before it has been fully rendered results in the report just being displayed in the top left hand side of the preview window.

 

Setting the size to something else then correcting it in the Form.Activate event causes the form to change size (or become maximized) and therefore redraw the report, which is not very professional looking.

 

Is it not possible to make it so that the zoom level could be set at any time (regardless of having a ReportSource set or the form visible, etc.) and when it comes time to render the report to pick up those settings and apply them?

 

I have spent a significant amount of time trying all sorts of things to get this to work, including hours spent searching the community posts here and elsewhere on the web. It looks to me like there are lots of people who have had issues with setting the Zoom level over the years without there really being a satisfactory solution to the various problems.

 

Can someone please loom into this and get back to me?

 

Thanks,

Gareth


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>