# Export Reports

## Content

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. |
| <span data-highlighted="true" data-vc="highlighted-text" style="box-sizing: border-box; color: rgb(41, 42, 46); font-family: Atlassian Sans, ui-sans-serif, -apple-system, BlinkMacSystemFont, Segoe UI, Ubuntu, Helvetica Neue, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">RTF</span> (\*.<span data-highlighted="true" data-vc="highlighted-text" style="box-sizing: border-box; color: rgb(41, 42, 46); font-family: Atlassian Sans, ui-sans-serif, -apple-system, BlinkMacSystemFont, Segoe UI, Ubuntu, Helvetica Neue, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">rtf</span>) | Creates an <span data-highlighted="true" data-vc="highlighted-text" style="box-sizing: border-box; color: rgb(41, 42, 46); font-family: Atlassian Sans, ui-sans-serif, -apple-system, BlinkMacSystemFont, Segoe UI, Ubuntu, Helvetica Neue, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">RTF</span> 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 (\*.<span data-highlighted="true" data-vc="highlighted-text" style="box-sizing: border-box; color: rgb(41, 42, 46); font-family: Atlassian Sans, ui-sans-serif, -apple-system, BlinkMacSystemFont, Segoe UI, Ubuntu, Helvetica Neue, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">xls</span>) | Creates an <span data-testid="definition-highlighter" class="_5pioz8co _189e1dm9 _1il9buyh _19lc184f _d0altlke" style="border-image: linear-gradient(90deg, rgb(0, 101, 255), rgb(191, 99, 243), rgb(245, 230, 168)) 0 0 100% / 1 / 0 stretch; border-width: 0px 0px 1.49533px; border-bottom-style: solid; box-sizing: border-box; --_11qfq0e: solid;">XLS</span> file that can be opened by Microsoft Excel. |
| Microsoft Excel Open XML (\*.xlsx) | Creates an <span data-highlighted="true" data-vc="highlighted-text" style="box-sizing: border-box; color: rgb(41, 42, 46); font-family: Atlassian Sans, ui-sans-serif, -apple-system, BlinkMacSystemFont, Segoe UI, Ubuntu, Helvetica Neue, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">XLS</span> file that can be opened by Microsoft Excel 2007 and later. |
| Open XML Word (\*.<span data-highlighted="true" data-vc="highlighted-text" style="box-sizing: border-box; color: rgb(41, 42, 46); font-family: Atlassian Sans, ui-sans-serif, -apple-system, BlinkMacSystemFont, Segoe UI, Ubuntu, Helvetica Neue, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">docx</span>) | Creates a <span data-testid="definition-highlighter" class="_5pioz8co _189e1dm9 _1il9buyh _19lc184f _d0altlke" style="border-image: linear-gradient(90deg, rgb(0, 101, 255), rgb(191, 99, 243), rgb(245, 230, 168)) 0 0 100% / 1 / 0 stretch; border-width: 0px 0px 1.49533px; border-bottom-style: solid; box-sizing: border-box; --_11qfq0e: solid;">DOCX</span> 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), <span data-highlighted="true" data-vc="highlighted-text" style="box-sizing: border-box; color: rgb(41, 42, 46); font-family: Atlassian Sans, ui-sans-serif, -apple-system, BlinkMacSystemFont, Segoe UI, Ubuntu, Helvetica Neue, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">BMP</span>, PNG, JPEG, GIF images | Create image file of type TIFF (Tag Image File Format), <span data-highlighted="true" data-vc="highlighted-text" style="box-sizing: border-box; color: rgb(41, 42, 46); font-family: Atlassian Sans, ui-sans-serif, -apple-system, BlinkMacSystemFont, Segoe UI, Ubuntu, Helvetica Neue, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">BMP</span> (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. |

## **Export options**

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 <span data-highlighted="true" data-vc="highlighted-text" style="color: rgb(41, 42, 46); font-family: 'Atlassian Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Ubuntu, 'Helvetica Neue', sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">BMP</span>, 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 <span data-highlighted="true" data-vc="highlighted-text" style="color: rgb(41, 42, 46); font-family: 'Atlassian Sans', ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Ubuntu, 'Helvetica Neue', sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: pre-wrap; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">BMP</span>, PNG, JPEG, and GIF images.

## **Export FlexReport Programmatically**

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.

```csharp
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.