ActiveReports 8
Export(SectionDocument,Stream) Method
See Also  Example
GrapeCity.ActiveReports.Export.Image.v8 Assembly > GrapeCity.ActiveReports.Export.Image.Tiff.Section Namespace > TiffExport Class > Export Method : Export(SectionDocument,Stream) Method

document
The ActiveReports object to export.
outputStream
The System.IO.Stream to which to save the TIFF.

Glossary Item Box

Exports the document to the specified stream.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub Export( _
   ByVal document As SectionDocument, _
   ByVal outputStream As System.IO.Stream _
) 
C# 
public void Export( 
   SectionDocument document,
   System.IO.Stream outputStream
)

Parameters

document
The ActiveReports object to export.
outputStream
The System.IO.Stream to which to save the TIFF.

Example

Visual BasicCopy Code
Dim rpt As New SectionReport1()
rpt.Run(False)
Response.ContentType="image/tiff"
Dim Astream = New System.IO.MemoryStream()
Response.AddHeader("content-disposition","attachment;filename=temp.tiff")
Me.TiffExport1.Export(rpt.Document,Astream)
Response.AddHeader("Content-Length",Astream.Length.ToString())
Response.BinaryWrite(stream.ToArray())
Response.End()
C#Copy Code
SectionReport1 rpt = new SectionReport1();

try
{
rpt.Run(false);
}
catch(Exception eRunReport)
{
Response.Clear();
Response.Write("<h1>ErrorArunningAreport:</h1>");
Response.Write(eRunReport.ToString());
return;
}
Response.ContentType="image/tiff";
Response.AddHeader("content-disposition","attachment;Afilename=temp.tiff");
GrapeCity.ActiveReports.Export.Image.Tiff.Section.TiffExport T = new GrapeCity.ActiveReports.Export.Image.Tiff.Section.TiffExport();
System.IO.MemoryStream memStream= new System.IO.MemoryStream();
T.Export(rpt.Document,memStream);
Response.AddHeader("Content-Length",memStream.Length.ToString());
Response.BinaryWrite(memStream.ToArray());
Response.End();

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also