Specifies the format of the export file.
Namespace:
C1.C1ReportAssembly: C1.C1Report.2 (in C1.C1Report.2.dll)
Syntax
C# |
---|
public enum FileFormatEnum |
Visual Basic |
---|
Public Enumeration FileFormatEnum |
Members
Member name | Description | |
---|---|---|
HTML | Plain HTML format. This setting creates a single HTML file that can be viewed in any web browser. | |
HTMLPaged | Paged HTML format. This setting creates one HTML file for each page in the report, with links to navigate between pages. | |
HTMLDrillDown | Drill-down HTML format. This setting creates a single HTML file with collapsible headings. When viewed in a DHTML-capable browser, clicking group headers causes them to collapse and expand to show the detail. | |
Adobe PDF format. This setting creates a PDF file that can be viewed using Adobe Acrobat software. The PDF file includes an outline tree that is generated automatically based on the report structure. Each node in the tree corresponds to a group header section in the report. Invisible group header sections do not generate outline entries in the PDF document. | ||
PDFEmbedFonts | Adobe PDF format with embedded fonts. This setting creates a PDF file that can be viewed using Adobe Acrobat software. | |
Text | Plain text. This setting creates a plain ASCII file. | |
RTF | RTF format. This setting creates an RTF file that can be opened in Microsoft Word, WordPad, or any other RTF-capable text editor. | |
Excel | Microsoft Excel files. This setting creates a BIFF-8 Excel file that can be opened with Microsoft Excel 97 or later. | |
TIFF | TIFF format. This setting creates multi-page TIFF files. | |
PDFPrintUtil | Deprecated. Use PDF, PDFEmbedFonts, or PDFProcted instead. | |
PDFProtected | Protected PDF format. This setting creates a PDF file with a random password. The file can be opened and printed by anyone, but cannot be modified. | |
RTFLabels | RTF field-based format. This setting creates RTF files with absolutely-positioned fields. This format renders reports more accurately than the plain RTF format, and is recommended for creating label-style reports. However, the files created with this setting are harder to edit than the plan RTF format, and can only be previewed or printed correctly using Microsoft Word (this format doesn't work with WordPad). | |
TextSinglePage | Plain text. This setting creates a plain ASCII file as a single page. | |
Metafile | Compressed metafile. This setting creates a zip file containing one metafile (emf) per page. The default file extensions for this format are "zip" or "emz". | |
OpenXml | OpenXml file. This setting creates an OpenXml Excel file that can be opened with Microsoft Excel 2007 or later. |
Remarks
Use the members of this enumeration to set parameter
of the RenderToFile(String, FileFormatEnum) method in the C1Report class.
Examples
The following example renders the report to HTML, exporting fields as raw HTML with rich formatting:
Copy CodeVisual Basic
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' open custom output stream to unescape HTML codes Dim fileName As String = Application.StartupPath + "out.htm" Dim s As RawHtmlStream = New RawHtmlStream(fileName, FileMode.Create) ' render report to stream Cursor = Cursors.WaitCursor c1r.RenderToStream(s, C1.C1Report.FileFormatEnum.HTML) Cursor = Cursors.Default ' close stream s.Close() ' show what we have System.Diagnostics.Process.Start(fileName) End Sub |
Copy CodeC#
private void button1_Click(object sender, System.EventArgs e) { // open custom output stream to unescape HTML codes string fileName = Application.StartupPath + @"out.htm"; Stream s = new RawHtmlStream(fileName, FileMode.Create); // render report to stream Cursor = Cursors.WaitCursor; c1r.RenderToStream(s, C1.C1Report.FileFormatEnum.HTML); Cursor = Cursors.Default; // close stream s.Close(); // show what we have System.Diagnostics.Process.Start(fileName); } |