[]
The FlexViewer control provides an option to export reports in various formats at runtime using Export Filter drop-down present in the Export Menu.
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. |
Comma Separated Values | Create a csv file that gets opened in Microsoft Excel 2007 and later by default. |
For Adobe PDF (DS provider):
Options | Categories | Description |
---|---|---|
Export Filter | Allows users to choose the export format | |
General | PDF/A Compatible | Ensures the exported PDF is compliant with PDF/A, a standard for long-term archiving |
Embed TrueType Fonts | Embeds fonts into the file to preserve text appearance | |
Use Compression | Reduces the file size using | |
Generate Outlines | Adds bookmarks/outlines in the PDF for easier navigation | |
Document Restrictions | Allow content copying or extraction | Enables users to allow or restrict copying text/images from the exported document |
Allow annotation editing | Enables users to allow or restrict adding comments, highlights, or annotations. | |
Allow content editing | Enables users to allow or restrict editing of the Pdf content | |
Allow printing | Enables users to allow or restrict printing the document | |
Permissions (owner) password | Sets up protection using passwords that is required to make changes in document permissions or encryption | |
Document open (user) password | Sets up protection using passwords that is requires to open/view the exported file | |
Encryption Level | Dropdown to choose the encryption method (e.g. Standard40) | |
Output Range | Page Range | Allows user to export specific pages, and determine the number of pages |
Inverted | Checkbox to exclude the selected page range instead of exporting it. | |
Document Info | Allows users to add metadata to the exported file | |
Title | Document title shown in PDF readers. | |
Author/Creator | Person or organization responsible for the content | |
Subject | Topic or category of the document | |
Keywords | Searchable terms to make the file easier to find. |
For HTML documents:
Options | Categories | Description |
---|---|---|
General | Show Navigator | Adds a navigation pane to the exported HTML for easy page access |
Navigator Position | Sets where the navigation pane appears in HTML output | |
Single File | Users can choose to combines all content into one HTML file |
Export also supports Output Range option for HTML.
For Open XML Excel:
Options | Categories | Description |
---|---|---|
General | Tolerance when detecting text bond (points) | Controls how closely text elements must be to be grouped in Excel |
Use separate picture layer | Gives users the option to places images on a separate layer in Excel to preserve layout |
For Open XML Word:
Options | Categories | Description |
---|---|---|
Document info | Title | Document title shown in PDF readers. |
Author/ Creator | Person or organization responsible for the content | |
Operator | Person who exported or modified the document. | |
Manager | Name of the person overseeing the document or project. | |
Company | Name of the company that owns the document | |
Subject | Topic or category of the document | |
Comment | Notes or remarks embedded in the document | |
Creation time | Timestamp when the document was first created. | |
Revision time | Timestamp of the last modification | |
Keywords | Searchable terms to make the file easier to find. |
For BMP, PNG, JPEG, and GIF images:
Options | Categories | Description |
---|---|---|
Image | Monochrome | Exports the image in black and white only |
Resolution | Allows user to sets the image quality. The resolution range is 0-300 |
Export also supports Output Range option for BMP, PNG, JPEG, and GIF images.
Besides exporting FlexReport to different file formats at runtime, you can also export them programmatically. For exporting reports into different file formats, you need the respective classes available in the C1.Document API. The following example for exporting a report uses a sample created in Load Documents.
Render FlexReport using HTMLFilter class
FlexReport allows you to export a report to HTML format using the HtmlFilter class, which renders the report into HTML streams or files as showcased in the following code.
private void myButton_Click(object sender, RoutedEventArgs e)
{
HtmlFilter f = new HtmlFilter();
f.FileName = @"D:\Reports\ProductReport.html";
flexReport.RenderToFilter(f);
}
Similarly, the reports or PDF documents can be export in different formats using their respective classes and the RenderToFilter method, which renders the report or PDF into the ExportFilter object.