Search code examples
c#asp.net.netasp.net-mvcfastreport

Scale in FastReport.Net mvc


I would like to set the scale mode property of the preview(FastReport.Net mvc) control programmatically.

I accomplish that by this method But I Recieve This Error:

The type 'System.Windows.Forms.UserControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

webReport.Report.Preview.ZoomPageWidth();

Solution

  • this is the way I handle This by this Code:

    First Solution

    webReport.Zoom = 0.85f;

    Second Solution

    webReport.Height = System.Web.UI.WebControls.Unit.Percentage(95);