PivotTableHtmlWriter Class

NReco.PivotData Class Library Documentation
Renders pivot table report into HTML format.
Inheritance Hierarchy

SystemObject
  NReco.PivotData.OutputPivotTableWriterBase
    NReco.PivotData.OutputPivotTableHtmlWriter

Namespace:  NReco.PivotData.Output
Assembly:  NReco.PivotData.Extensions (in NReco.PivotData.Extensions.dll) Version: 1.4.2
Syntax

public class PivotTableHtmlWriter : PivotTableWriterBase

The PivotTableHtmlWriter type exposes the following members.

Constructors

  NameDescription
Public methodPivotTableHtmlWriter
Initializes a new instance of the PivotTableHtmlWriter class
Top
Properties

  NameDescription
Public propertyAllowHtml
Allow HTML in dimension labels/headers/formatted values (false by default).
Public propertyColumnHeaderClass
Gets or sets CSS class for table column header cells ('pvtColumn' by default).
Public propertyFormatDimensionLabel
Gets or sets custom formatting handler for dimension labels.
Public propertyFormatKey
Gets or sets custom formatting handler for table row/column labels (key,dimension)->(label).
Public propertyFormatMeasureHeader
Gets or sets custom formatting handler for measure headers (applicable only if several measures are used)
Public propertyFormatValue
Gets or sets custom formatting handler for table cell values (measure,measure index)->(value)
Public propertyGrandTotal
Include grand totals value into resulting pivot table (true by default).
(Inherited from PivotTableWriterBase.)
Public propertyMeasureHeaderClass
Gets or sets CSS class for measure header cells ('pvtMeasure' by default).
Public propertyRenderDimensionLabel
Get or sets dimension label rendering option (by default both column and row dimension labels are rendered).
Public propertyRenderKeyIndexAttr
Gets or sets flag which indicates whether writer should render "data-sort-index" attributes.
Public propertyRenderSortIndexAttr
Gets or sets flag which indicates whether writer should render "data-sort-index" attributes.
Public propertyRenderTheadTbody
Get or sets flag which indicates whether writer should render headers in THEAD/TBODY section.
Public propertyRenderValueIndexAttr
Gets or sets flag which indicates whether writer should render "data-value-index" attributes.
Public propertyRepeatDuplicateKeysAcrossDimensions
Repeat duplicate keys across dimensions in one group (repeat for both rows and columns by default).
Public propertyRepeatKeysInGroups
Repeat keys in group of the same dimension (no repeat by default).
Public propertyRowHeaderClass
Gets or sets CSS class for table row header cells ('pvtRow' by default).
Public propertySubtotalColumns
Include subtotal columns into resulting pivot table (false by default).
Public propertySubtotalDimensions
Explicit list of dimensions with subtotals (null = generate subtotals for all groups).
Public propertySubtotalKeySuffix
Suffix added to subtotal keys (" Total" by default).
Public propertySubtotalRows
Include subtotal rows into resulting pivot table (false by default).
Public propertyTableClass
Gets or sets CSS class for HTML table ('pvtTable' by default).
Public propertyTotalsColumn
Include totals column into resulting pivot table (true by default).
(Inherited from PivotTableWriterBase.)
Public propertyTotalsColumnHeaderText
Gets or sets title text for totals column header (Totals by default).
(Inherited from PivotTableWriterBase.)
Public propertyTotalsRow
Include totals row into resulting pivot table (true by default).
(Inherited from PivotTableWriterBase.)
Public propertyTotalsRowHeaderText
Gets or sets title text for totals row header (Totals by default).
(Inherited from PivotTableWriterBase.)
Top
Methods

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Protected methodGetAggregatorsCount (Inherited from PivotTableWriterBase.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodOnWriteKeyCell
This method is called when table key cell is about to render.
Protected methodOnWriteValueCell
This method is called when table value cell is about to render.
Public methodToString (Inherited from Object.)
Public methodWrite
Renders pivot table as HTML report using data from specified PivotTable instance.
Top
Remarks

Examples

The following code snippet illustrates how to render data represented by PivotTable instance into HTML format:
PivotTable pvtTbl; // lets assume we already have a PivotTable instance
            var htmlRes = new StringWriter();
            var pvtHtmlWr = new PivotTableHtmlWriter(htmlRes);
            pvtHtmlWr.ValueFormat = "{0:0.##}";
            pvtHtmlWr.Write(pvtTbl);
See Also

Reference