ActiveReports 9
CharacterSet Property (HtmlExport)
Example 

Sets or returns the character set encoding that will be used in the exported HTML pages.
Syntax
'Declaration
 
Public Property CharacterSet As HtmlCharacterSet
public HtmlCharacterSet CharacterSet {get; set;}

Property Value

HtmlCharacterSet enumeration.
Remarks

The default character set is UTF8. Setting this property will change the meta tag in the header of the resulting HTML pages to the appropriate IANA character set value.

For example: <META content="text/html;charset=ISO-8859-1" http-equiv=Content-Type>.

Additionally, the inner text portion of the pages will be encoded according to the specific character set's encoding rules and font names. If you are exporting a Document without headers (IncludeHtmlHeader=false), then you must insert the appropriate meta tag to ensure that the browser knows how the text is encoded.

Example
private void btnExport_Click(object sender, System.EventArgs e)
{
    SectionReport1 rpt = new SectionReport();
    GrapeCity.ActiveReports.Export.Html.Section.HtmlExport h = new  GrapeCity.ActiveReports.Export.Html.Section.HtmlExport();
    h.CharacterSet =  GrapeCity.ActiveReports.Export.Html.Section.HtmlCharacterSet.Big5;
    rpt.Run();
    this.arv.Document = rpt.Document;
    h.Export(rpt.Document, Application.StartupPath + "\\h.html");
}
Private Sub Viewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Viewer1.Load
    Dim rpt As New SectionReport1
    rpt.Run()
    Me.Viewer1.Document = rpt.Document
    Dim h As New  GrapeCity.ActiveReports.Export.Html.Section.HtmlExport
    h.CharacterSet =  GrapeCity.ActiveReports.Export.Html.Section.HtmlCharacterSet.Big5
    h.Export(rpt.Document, Application.StartupPath + "/export.html")
End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

HtmlExport Class
HtmlExport Members
HtmlCharacterSet Enumeration

 

 


Copyright © 2014 GrapeCity, inc. All rights reserved

Support Forum