ActiveReports.Viewer3 Request technical support
Document Property
See Also  Example


Gets or sets an ActiveReports Document to be displayed in the viewer control.

Syntax

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

Return Value

A Document value that represents the current document displayed in the viewer.

Example

C#Copy Code
private void Form1_Load(object sender, System.EventArgs e)
{    
   ResourceManager res =
new ResourceManager("rptLocalize.localization", this.GetType().Assembly);    
   
this.viewer1.Localize = res;    
   rptLocalize rpt =
new rptLocalize();    
   viewer1.Document = rpt.Document;    
   rpt.Run(true);
}
Visual BasicCopy Code
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim res As New ResourceManager("rptLocalize.localization", Me.GetType().Assembly)
    Me.Viewer1.Localize = res
    Dim rpt As New rptLocalize()
    Viewer1.Document = rpt.Document
    rpt.Run(True)
End Sub

Remarks

The Document can be assigned from an ActiveReport.Document before running the report using the ActiveReport.Run(true) method and pages will be synchronized and display in the viewer immediately after the report renders them.

In addition, the Document can be set to the report's Document after it is completed.

See Also