ActiveReports.Viewer3 Request technical support
Save(Stream) Method
See Also  Example


stream
Specifies the Stream object where the document should be saved.
Saves the Document content to a Stream.

Syntax

Visual Basic (Declaration) 
Overloads Public Sub Save( _
   ByVal stream As Stream _
) 
Visual Basic (Usage)Copy Code
Dim instance As Document
Dim stream As Stream
 
instance.Save(stream)
C# 
public void Save( 
   Stream stream
)

Parameters

stream
Specifies the Stream object where the document should be saved.

Example

C#Copy Code
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 BasicCopy Code
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

Remarks

Default document file format is ARNet file.

See Also