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. |
The following code describes how to export a FlexReport to PDF using PdfFilter class.
C# |
Copy Code
|
---|---|
//create a PDf filter PdfFilter filter = new PdfFilter(); //ShowOPtions to false to not show options dialog filter.ShowOptions = false; //filename of the saved pdf file filter.FileName = "testPDF.pdf"; report.RenderToFilter(filter); Process.Start("testPDF.pdf"); |
The following code describes how to export a FlexReport to PDF using ImageFilter class.
C# |
Copy Code
|
---|---|
//can use TIFF, PNG, JPEG, GIF similarly //create a Bitmap filter BmpFilter filter = new BmpFilter(); //Set UseZipForMultipleFiles to true to get all image in a zip file filter.UseZipForMultipleFiles = true; //provide file name filter.FileName = "bmpExport.zip"; report.RenderToFilter(filter); Process.Start(Directory.GetCurrentDirectory()); |
The following code describes how to export a FlexReport to PDF using HtmlFilter class.
C# |
Copy Code
|
---|---|
//create Html filter HtmlFilter filter = new HtmlFilter(); //provide filename filter.FileName = "htmlExport.html"; report.RenderToFilter(filter); Process.Start("htmlExport.html"); |
The following code describes how to export a FlexReport to PDF using HtmlFilter class, and by setting the Paged property to true.
C# |
Copy Code
|
---|---|
//create HTMl filter HtmlFilter filter = new HtmlFilter(); //set page = true for paged html filter.Paged = true; //provide filename filter.FileName = "pagedhtmlExport.html"; report.RenderToFilter(filter); Process.Start("pagedhtmlExport.html"); |
The following code describes how to export a FlexReport to PDF using RtfFilter class.
C# |
Copy Code
|
---|---|
//create RTF filter RtfFilter filter = new RtfFilter(); //provide filename filter.FileName = "rtfExport.rtf"; report.RenderToFilter(filter); Process.Start("rtfExport.rtf"); |
The following code describes how to export a FlexReport to PDF using XlsFilter class, and set the OpenXml property to false.
C# |
Copy Code
|
---|---|
//create XLS filter XlsFilter filter = new XlsFilter(); //provide filename filter.FileName = "xlsExport.xls"; //set OpenXML to false for XLS format filter.OpenXml = false; report.RenderToFilter(filter); Process.Start("xlsExport.xls"); |
The following code describes how to export a FlexReport to PDF using XlsFilter class, and set the OpenXml property to True.
C# |
Copy Code
|
---|---|
//create XLS filter XlsFilter filter = new XlsFilter(); //provide filename filter.FileName = "xlsxExport.xlsx"; //set openxml to true for XLSX format filter.OpenXml = true; report.RenderToFilter(filter); Process.Start("xlsxExport.xlsx"); |
The following code describes how to export a FlexReport to PDF using RtfFilter class, and set the OpenXml property to True.
C# |
Copy Code
|
---|---|
//create RTF filter RtfFilter filter = new RtfFilter(); //set openXML to true for DOCX format filter.OpenXml = true; //provide filename filter.FileName = "docxExport.docx"; report.RenderToFilter(filter); Process.Start("docxExport.docx"); |
The following code describes how to export a FlexReport to PDF using MetafileFilter class.
C# |
Copy Code
|
---|---|
//create MetafileFilter MetafileFilter filter = new MetafileFilter(); //provide filename filter.FileName = "metaExport.zip"; report.RenderToFilter(filter); Process.Start("metaExport.zip"); |