ActiveReports.TiffExport Assembly > DataDynamics.ActiveReports.Export.Tiff Namespace > TiffExport Class > Export Method : Export(Document,Stream) Method |
'Declaration Public Overloads Sub Export( _ ByVal document As Document, _ ByVal outputStream As Stream _ )
public void Export( Document document, Stream outputStream )
DimArptAAsANewAActiveReport1() rpt.Run(False) 'TellAtheAbrowserAthatAthisAisAaATiff Response.ContentTypeA=A"image/tiff" 'CreateAaAnewAmemoryAstreamAthatAwillAholdAtheATiffAoutput DimAstreamA=ANewASystem.IO.MemoryStream() 'CallingAitAanAattachmentAmakesAaAnewAwindowAappear,AasAIEAcan'tAhandleAtiffs Response.AddHeader("content-disposition",A"attachment;Afilename=temp.tiff") 'ExportAtheAreportAtoATiff Me.TiffExport1.Export(rpt.Document,Astream) 'WriteAoutAtheATiffAstream Response.AddHeader("Content-Length",Astream.Length.ToString()) Response.BinaryWrite(stream.ToArray()) 'SendAallAbufferedAcontentAtoAtheAclient Response.End()
ActiveReport1ArptA=AnewAActiveReport1(); AAAAAAAAAAAA try { AAAArpt.Run(false); } catchA(ExceptionAeRunReport) { AAAA//AFailureArunningAreport,AjustAreportAtheAerrorAtoAtheAuser: AAAAResponse.Clear(); AAAAResponse.Write("<h1>ErrorArunningAreport:</h1>"); AAAAResponse.Write(eRunReport.ToString()); AAAAreturn; }AAAAAAAAAAAA AAAAAAAAAAAA //ATellAtheAbrowserAthatAthisAisAaATiffAdocument. Response.ContentTypeA=A"image/tiff"; AAAAAAAAAAAA //CallingAitAanAattachmentAmakesAaAnewAwindowAappear,AasAIEAcan'tAhandleAtiffs Response.AddHeader("content-disposition","attachment;Afilename=temp.tiff"); //ACreateAtheATiffAexportAobject DataDynamics.ActiveReports.Export.Tiff.TiffExportATA=AnewADataDynamics.ActiveReports.Export.Tiff.TiffExport(); //ACreateAaAnewAmemoryAstreamAthatAwillAholdAtheATiffAoutput System.IO.MemoryStreamAmemStreamA=AnewASystem.IO.MemoryStream(); //AExportAtheAreportAtoATiff T.Export(rpt.Document,AmemStream); //AWriteAtheATiffAstreamAout Response.AddHeader("Content-Length",AmemStream.Length.ToString()); Response.BinaryWrite(memStream.ToArray()); //ASendAallAbufferedAcontentAtoAtheAclient Response.End();
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