TIFF, or tagged image file format, opens in the Windows Picture and Fax Viewer or any TIFF viewer. This export looks very much like the report as it displays in the viewer, but it is a multi-page image, so the text cannot be edited. The TIFF export filter has a couple of useful properties that allow you to control your output. You can set the properties either in code using the TIFFExport object after adding reference to MESCIUS.ActiveReports.Export.Image package in your projet.
Property | Valid Values | Description |
---|---|---|
CompressionScheme | None, Rle, Ccitt3 (default), Ccitt4 or Lzw |
Select an enumerated value to use for color output control:
|
Dither | True or False (default) | Set to True to dither the image when you save it to a black and white format (Ccitt3, Ccitt4 or Rle). This property has no effect if the CompressionScheme is set to Lzw or None. |
DpiX | Integer (VB) or int (C#) greater than 0 |
Set the horizontal resolution of a report when exporting to TIFF format. The default value is 200. Setting the DpiX or DpiY property to large values can cause the rendered image to be too large and not enough memory in system can be allocated to the bitmap. |
DpiY | Integer (VB) or int (C#) greater than 0 |
Set the vertical resolution of a report when exporting to TIFF format. The default value is 196. Setting the DpiX or DpiY property to large values can cause the rendered image to be too large and not enough memory in system can be allocated to the bitmap. |
Pagination | True (default) or False | By default, each page of a report is rendered as a separate image. Set this value to False to render the entire report as a single image. This property is only useful for Page/RDLX reports exports through RDF and does not affect a section report. |
Use the following steps to export reports through TIFF export filters.
Visual Basic.NETcode. Paste INSIDE the Form_Load event |
Copy Code
|
---|---|
' Create a Section report. Dim rpt As New GrapeCity.ActiveReports.SectionReport() ' For the code to work, report.rpx must be placed in the bin\debug folder of your project. Dim xtr As New System.Xml.XmlTextReader(Application.StartupPath + "\report.rpx") rpt.LoadLayout(xtr) rpt.Run() ' Export the report in TIFF format. Dim TiffExport1 As New GrapeCity.ActiveReports.Export.Image.Tiff.Section.TiffExport() TiffExport1.Export(rpt.Document, Application.StartupPath + "\TIFFExpt.tiff") |
C# code. Paste INSIDE the Form_Load event. |
Copy Code
|
---|---|
// Create a Section Report GrapeCity.ActiveReports.SectionReport rpt = new GrapeCity.ActiveReports.SectionReport(); // For the code to work, report.rpx must be placed in the bin\debug folder of your project. System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader(Application.StartupPath + "\\report.rpx"); rpt.LoadLayout(xtr); rpt.Run(); // Export the report in TIFF format. GrapeCity.ActiveReports.Export.Image.Tiff.Section.TiffExport TiffExport1 = new GrapeCity.ActiveReports.Export.Image.Tiff.Section.TiffExport(); TiffExport1.Export(rpt.Document, Application.StartupPath + "\\TIFFExpt.tiff"); |