HTML, or hypertext markup language, is a format that opens in a Web browser. The HTML export filter has a number of useful properties that allow you to control your output. You can set the properties either in code using the HTMLExport object after adding reference to MESCIUS.ActiveReports.Export.Html package in your project.
Property | Valid Values | Description |
---|---|---|
BookmarkStyle | Html (default) or None | Set to Html to generate a page of bookmarks from the bookmarks in the report. If the report has no bookmarks, this setting is ignored. |
CharacterSet | Big5, EucJp, HzGb2312, Ibm850, Iso2022Jp, Iso2022Kr, Iso8859_1, Iso8859_2, Iso8859_5, Iso8859_6, Koi8r, Ksc5601, ShiftJis, UnicodeUtf16, UnicodeUtf8 (default) | Select the IANA character set that you want to use in the meta tag in the header section of the HTML output. This property only takes effect if the IncludeHtmlHeader property is set to True. |
CreateFramesetPage | True or False (default) | Set to True to generate a set of frames that display a page of bookmarks (if available) in the left frame and the report document in the right frame. The HTML output uses the specified filename with the extension .frame.html. |
IncludeHtmlHeader | True (default) or False | Set to False if you want to embed the HTML output in another HTML document. Otherwise, the HTML output includes the usual HTML, HEAD, and BODY elements. |
IncludePageMargins | True or False (default) | Set to True to include the report's margins in the HTML output. |
MultiPage | True or False (default) | Set to True to create a separate HTML page for each page of the report. Otherwise, the HTML output is a single page. |
OutputType | DynamicHtml (default) or LegacyHtml | Set to LegacyHtml to use tables for positioning and avoid the use of cascading style sheets (CSS). Otherwise, positioning of controls is handled in the CSS. |
Pagination | True (default) or False | Gets or sets the value, that indicates whether to use pagination for the resultant html document. This property is only useful for Page/RDLX reports exports through RDF and does not affect a section report. |
RemoveVerticalSpace | True or False (default) | Set to True if the OutputType property is set to LegacyHtml and you plan to print the output from a browser. This removes white space from the report to help improve pagination. Otherwise, vertical white space is kept intact. |
Title | Any String | Enter the text to use in the header section's title. This is displayed in the title bar of the browser. |
By default, the report is exported as DynamicHtml (DHTML), with cascading style sheets (CSS). Using the OutputType property, you can change the output to LegacyHtml (HTML). Neither of the output types creates a report that looks exactly like the one you display in the viewer because of differences in formats. Following is the usage of each output type and controls to avoid in each.
Usage:
Does not support:
Usage:
Does not support:
Use the following steps to export reports through HTML export filter.
Visual Basic.NETcode. Paste INSIDE the Form_Load event |
Copy Code
|
---|---|
' Create a Section report. Dim rpt As New GrapeCity.ActiveReports.SectionReport() ' For the code to work, report.rpx must be placed in the bin\debug folder of your project. Dim xtr As New System.Xml.XmlTextReader(Application.StartupPath + "\report.rpx") rpt.LoadLayout(xtr) rpt.Run() ' Export the report in HTML format. Dim HtmlExport1 As New GrapeCity.ActiveReports.Export.Html.Section.HtmlExport() HtmlExport1.Export(rpt.Document, Application.StartupPath + "\HTMLExpt.html") |
C# code. Paste INSIDE the Form_Load event. |
Copy Code
|
---|---|
// Create a Section Report GrapeCity.ActiveReports.SectionReport rpt = new GrapeCity.ActiveReports.SectionReport(); // For the code to work, report.rpx must be placed in the bin\debug folder of your project. System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader(Application.StartupPath + "\\report.rpx"); rpt.LoadLayout(xtr); rpt.Run(); // Export the report in HTML format. GrapeCity.ActiveReports.Export.Html.Section.HtmlExport HtmlExport1 = new GrapeCity.ActiveReports.Export.Html.Section.HtmlExport(); HtmlExport1.Export(rpt.Document, Application.StartupPath + "\\HTMLExpt.html"); |