Working with FlexReport > Exporting Reports > Render FlexReport using Different Export Filters for Images |
FlexReport allows you to render a report to various image file formats, such as PNG, JPG, BMP, GIF, and TIFF. Each of these image file formats have an exclusive export filter for a particular format. PngFilter class can be used to render a report to PNG format. Similarly, JpegFilter class is used to render a report to JPEG format, GifFilter class is used to render a report to GIF format, BmpFilter class is used to render a report to BMP format, and TiffFilter class is used to render a report to TIFF format.
To render a FlexReport in PNG format, use the following code. This example uses sample created in FlexReport Quick Start.
Dim f As New PngFilter() f.FileName = "..\..\ProductsReport.png" rep.RenderToFilter(f) System.Diagnostics.Process.Start(f.OutputFiles(0))
PngFilter f = new PngFilter(); f.FileName = @"..\..\ProductsReport.png"; rep.RenderToFilter(f); System.Diagnostics.Process.Start(f.OutputFiles[0]);