ActiveReports 18 .NET Edition
Developers / Export Reports / Export Section Reports / TIFF Export
In This Topic
    TIFF Export
    In This Topic

    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.

    TIFF Export Properties

    Property Valid Values Description
    CompressionScheme None, Rle, Ccitt3 (default), Ccitt4 or Lzw

    Select an enumerated value to use for color output control:

    • None delivers color output with no compression.
    • Rle (run-length encoding) is for 1, 4, and 8 bit color depths.
    • Ccitt3 and Ccitt4 are for 1 color depth, and are used in old standard faxes.
    • Lzw (based on Unisys patent) is for 1, 4, and 8 bit color depths with lossless compression.
    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.

    TIFF Export usage:

    Export Report using TIFF Export Filter

    Use the following steps to export reports through TIFF export filters.

    1. Create a new or open an existing Visual Studio project.
      • If you are creating a new project,
        - select ActiveReports 18 Section Report (xml-based) Application in Create a New Project dialog, and then
        - specify a name for the project, and click OK.
      • If you are using an existing project,
        - go to the Solution Explorer and right-click the project and select Add > New Item, and then
        - select ActiveReports 18 Section Report (xml-based) and click Add.
    2. Add a reference to MESCIUS.ActiveReports.Export.Image package in the project. See Manage ActiveReports Dependencies for more information.
    3. In your project's Bin>Debug folder, place the report.rpx (Section Report).    
    4. On the Form.cs or Form.vb, double-click the title bar to create the Form_Load event.
    5. In Form_Load event, add the following code to export Section Reports .
      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");