Gets or sets the viewer's zoom level.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Property Zoom As Single |
| 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 Basic | Copy 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
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also