ActiveReports.Viewer3 Request technical support
Zoom Property
See Also  Example


Gets or sets the viewer's zoom level. 

Syntax

Visual Basic (Declaration) 
Public Property Zoom As Single
Visual Basic (Usage)Copy Code
Dim instance As ReportViewerObject
Dim value As Single
 
instance.Zoom = value
 
value = instance.Zoom
C# 
public float Zoom {get; set;}

Return Value

A float value. The valid range is from 0.1 to 8.0 (0.1=10%, 8.0=800%) or -1 for Fit Page Width and -2 for Fit Whole Page. The default value is 1 (100%).

Example

This snippet displays the whole page in the viewer.
C#Copy Code
private void arv_Load(object sender, System.EventArgs e)
{
   rptDD rpt =
new rptDD();
   rpt.Run();
   arv.Document = rpt.Document;
   arv.ReportViewer.Zoom = -2;
}
Visual BasicCopy Code
Private Sub arv_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles arv.Load
    Dim rpt As New rptDD
    rpt.Run()
    arv.Document = rpt.Document
    arv.ReportViewer.Zoom = -2
End Sub

Remarks

Values of 0 , -1, and -2 can only be set at run time.

See Also