Instead of printing the report, you may want to export it into a file and distribute it to your clients or co-workers. To export a file in FlexReportDesigner, select Export option from the File menu and use the Export Report to File dialog box to specify the location, File name and Save as type.
The FlexReportDesigner supports the following export formats:
Format | Description |
---|---|
Paged HTML (*.html) | Creates one HTML file for each page in the report. The HTML pages contain links that let the user navigate the report. |
Plain HTML (*.html) | Creates a single HTML file with no drill-down functionality. |
PDF with non-embedded (linked) fonts (*.pdf) | Creates a PDF file that can be viewed on any computer equipped with Adobe's Acrobat viewer or browser plug-ins. |
PDF/A with embedded fonts (*.pdf) | Creates a PDF file with embedded font information for extra portability. |
RTF (*.rtf) | Creates an RTF file that can be opened by most popular word processors (for example, Microsoft Word, WordPad). It can be saved as Paged or Open XML document. |
Microsoft Excel 97 (*.xls) | Creates an XLS file that can be opened by Microsoft Excel. |
Microsoft Excel Open XML (*.xlsx) | Creates an XLS file that can be opened by Microsoft Excel 2007 and later. |
Open XML Word (*.docx) | Creates a DOCX file that can be opened by Microsoft Word 2007 and later. |
Compressed Metafile (*.zip) | Creates a compressed metafile file, of the type EmfOnly, EmfPlusOnly,and EmfPlusDual. |
TIFF (*.tiff), BMP, PNG, JPEG, GIF images | Create image file of type TIFF (Tag Image File Format), BMP (Bitmap Images), PNG(Portable Network Graphic), JPEG or GIF. |
FlexReport allows you to render a report to PDF format using PdfFilter class. The PdfFilter class renders the report into PDF streams or files.
To render a FlexReport in PDF format, use the following code. This example uses sample created in FlexReport Quick Start.
You can also use the following properties of PdfFilter class:
Properties | Description |
---|---|
EmbedFonts | Used to embed font information in PDF document. |
PdfACompatible | Used to generate PDF/A compatible document. |
PdfSecurityOptions | Used to specify who can use the Pdf document and what actions are allowed on it. |
UseCompression | Used for PDF document compression. |
UseOutlines | Used to include an outline tree. |
FlexReport allows you to render a report to HTML format using HtmlFilter class. The HtmlFilter class renders the report into HTML streams or files.
To render a FlexReport to HTML format, use the following code. This example uses sample created in FlexReport Quick Start.
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.
FlexReport allows you to export a report to RTF format using RtfFilter class. The RtfFilter class exports the report into RTF streams or files.
To export a FlexReport to RTF format, use the following code. The example uses sample created in FlexReport Quick Start.
You can also use the following properties of RtfFilter class:
Properties | Description |
---|---|
OpenXML | Used to export the file in OpenXML format. |
Paged | Used to preserve the page layout of the original report. |
ShapesWord2007Compatible | Used to indicate the Word 2007 shapes format compatibility in a report to be saved to DOCX format. |
As an alternative to using a specific format filter (for example, PdfFilter) for exporting a report to a particular format ( say, PDF format), FlexReport allows you to export a report to different formats using ExportFilter class. The ExportFilter class is an abstract base class for all exporter classes. An object of ExportFilter class is used to export a report to different formats. The ExportFilter class accesses the ExportProvider abstract class which describes supported export formats.
In the following code, we have used the ExportFilter class that accesses the ExportProvider class to list all the export formats in a ComboBox, which are described in the ExportProvider class. To do so, a ComboBox control is added in the design view to show the list of available export formats and its name is set to cbxExportFormat.
You can also use the following properties available in ExportFilter class:
Properties | Description |
---|---|
FileName | Used to name the output file. |
MultiFile | Used to indicate whether multiple files were generated during export. |
OutputFiles | Used to show the list of files which were generated by the call to Export(string). |
PageSettings | Used to specify the settings that apply to a page. |
Preview | Used to indicate whether the exported document should be opened after exporting it to a disk file. |
Range | Used to represent the range of pages to be exported. |
ShowOptions | Used to indicate whether the options dialog should be shown before exporting the document. |
Stream | Used to specify the output stream. |
UseZipForMultipleFiles | Used to indicate whether the output (stream or file) should be a zipped archive with the generated files, if multiple files are created during export. |