See Also

Document Class  | Document Members  | Load method  | LoadUrl property  | Walkthrough: Saving and Loading to a Memory Stream

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports.Viewer Send feedback to Data Dynamics

Save Method

Saves the Document content to a stream or a file.

Overload List

Saves the Document content to a Stream.
Saves the Document content to a stream in the specified file format.
Saves the Document content to a stream in the specified file format with the specified compression.
Saves the report document to the specified file.
Saves the report document to the specified file using the specified file format.
Saves the report document to the specified file using the specified file format with the specified compression.

Example

[C#] 

private void Form1_Load(object sender, System.EventArgs e) 
{     
    System.IO.MemoryStream strm = new System.IO.MemoryStream();     
    rptMemoryStream rpt = new rptMemoryStream();     
    rpt.Run();     
    rpt.Document.Save(strm);     
    byte[] theBytes = new byte[strm.Length];     
    strm.Read(theBytes, 0, (int)strm.Length);     
    strm.Position =0;     
    viewer1.Document.Load(strm); 
}

[Visual Basic] 

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim strm As New System.IO.MemoryStream()
    Dim rpt As New rptMemoryStream()
    rpt.Run()
    rpt.Document.Save(strm)
    Dim theBytes(strm.Length) As Byte
    strm.Read(theBytes, 0, Int(strm.Length))
    strm.Position = 0
    Viewer1.Document.Load(strm)
End Sub

See Also

Document Class  | Document Members  | Load method  | LoadUrl property  | Walkthrough: Saving and Loading to a Memory Stream

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.