Scale Mode in Preview Control

Hi Alex,

we would like to set the scale mode property of the preview control programmatically.
For example to "fit to page" or "87%".
How to accomplish that? In the class reference we could not find a suitable property
or method.


Best Regards

Claus

Comments

  • edited 7:47AM
    Hello,

    It's a Zoom property, and ZoomIn, ZoomOut, ZoomPageWidth, ZoomWholePage methods of the PreviewControl.
  • edited 7:47AM
    OK, but how to apply? We used the code below, but preview windows didn't scale.

    frReport = new FastReport.Report();
    frReport.Load(sFilename);
    frReport.SetParameterValue(...);
    frReport.Preview = this.frPreview;
    frPreview.ZoomWholePage();
    frReport.Show();

    Used Version 1.0.56.0.

    Regards
  • edited 7:47AM
    Do it after preview:

    frReport.Show();
    frPreview.ZoomWholePage();
  • edited 7:47AM
    ... it didn't help!
  • edited 7:47AM
    I see; it is needed to do Application.DoEvents() before changing scale mode. I will fix it in the next build.

Leave a Comment