Renders pivot table report into HTML format.
Inheritance Hierarchy
NReco.PivotData.OutputPivotTableWriterBase
NReco.PivotData.OutputPivotTableHtmlWriter
Namespace: NReco.PivotData.Output
Assembly: NReco.PivotData.Extensions (in NReco.PivotData.Extensions.dll) Version: 1.6.1
Syntax
The PivotTableHtmlWriter type exposes the following members.
Constructors
Name | Description | |
---|---|---|
PivotTableHtmlWriter | Initializes a new instance of the PivotTableHtmlWriter class |
Properties
Name | Description | |
---|---|---|
AllowHtml |
Allow HTML in dimension labels/headers/formatted values (false by default).
| |
CollapseConfiguration |
Enables ability to collapse groups and applies specified expand/collapse state.
| |
ColumnHeaderClass |
Gets or sets CSS class for table column header cells ('pvtColumn' by default).
| |
FormatDimensionLabel |
Gets or sets custom formatting handler for dimension labels.
| |
FormatKey |
Gets or sets custom formatting handler for table row/column labels (key,dimension)->(label).
| |
FormatMeasureHeader |
Gets or sets custom formatting handler for measure headers (applicable only if several measures are used)
| |
FormatValue |
Gets or sets custom formatting handler for table cell values (measure,measure index)->(value)
| |
GrandTotal |
Include grand totals value into resulting pivot table (true by default).
(Inherited from PivotTableWriterBase.) | |
MeasureHeaderClass |
Gets or sets CSS class for measure header cells ('pvtMeasure' by default).
| |
RenderDimensionLabel |
Get or sets dimension label rendering option (by default both column and row dimension labels are rendered).
| |
RenderKeyIndexAttr |
Gets or sets flag which indicates whether writer should render "data-sort-index" attributes.
| |
RenderSortIndexAttr |
Gets or sets flag which indicates whether writer should render "data-sort-index" attributes.
| |
RenderTheadTbody |
Get or sets flag which indicates whether writer should render headers in THEAD/TBODY section.
| |
RenderValueIndexAttr |
Gets or sets flag which indicates whether writer should render "data-value-index" attributes.
| |
RepeatDuplicateKeysAcrossDimensions |
Repeat duplicate keys across dimensions in one group (repeat for both rows and columns by default).
| |
RepeatKeysInGroups |
Repeat keys in group of the same dimension (no repeat by default).
| |
RowHeaderClass |
Gets or sets CSS class for table row header cells ('pvtRow' by default).
| |
SubtotalColumns |
Include subtotal columns into resulting pivot table (false by default).
| |
SubtotalDimensions |
Explicit list of dimensions with subtotals (null = generate subtotals for all groups).
| |
SubtotalKeySuffix |
Suffix added to subtotal keys (" Total" by default).
| |
SubtotalRows |
Include subtotal rows into resulting pivot table (false by default).
| |
TableClass |
Gets or sets CSS class for HTML table ('pvtTable' by default).
| |
TotalsColumn |
Include totals column into resulting pivot table (true by default).
(Inherited from PivotTableWriterBase.) | |
TotalsColumnHeaderText |
Gets or sets title text for totals column header (Totals by default).
(Inherited from PivotTableWriterBase.) | |
TotalsColumnPosition |
Determins totals column position (first column or last column).
(Inherited from PivotTableWriterBase.) | |
TotalsRow |
Include totals row into resulting pivot table (true by default).
(Inherited from PivotTableWriterBase.) | |
TotalsRowHeaderText |
Gets or sets title text for totals row header (Totals by default).
(Inherited from PivotTableWriterBase.) | |
TotalsRowPosition |
Determins totals row position (first row or last row).
(Inherited from PivotTableWriterBase.) |
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetAggregatorsCount | (Inherited from PivotTableWriterBase.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
OnBeforeRender | ||
OnWriteKeyCell |
This method is called when table key cell is about to render.
| |
OnWriteValueCell |
This method is called when table value cell is about to render.
| |
ToString | (Inherited from Object.) | |
Write |
Renders pivot table as HTML report using data from specified PivotTable instance.
|
Remarks
Examples
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