Next
Update
Prev

The sub total and grand total can be created using <SpanSummaryRow>. This example demonstrates that the Year and Quarter columns are set to be merged, whose values are same, and the sub total of both columns (Year, Quarter) and the grand total are created.

...
<SpanRowAttribute id="sumRowAttr" styleName="allTotalStyle" backgroundColor="#FFF19F" />
...
<SpanCellAttribute id="sum1CellAttr" colNo="0" styleName="subTotalStyle" backgroundColor="#CCDD66" />
...
<dataProvider>
  <SpanSummaryCollection source="{$gridData}" >
    <mergingFields>
      <SpanMergingField name="Year" />
        <SpanSummaryRow label="Yearly Subtotal" labelDataField="Year" rowAttribute="{sumRowAttr_Y}" cellAttribute="{sum1CellAttr}" />
          ...
        <SpanSummaryRow/>
      <SpanMergingField name="Quarter" />
        <SpanSummaryRow label="Quarterly Subtotal" labelDataField="Quarter" rowAttribute="{sumRowAttr}" cellAttribute="{sum2CellAttr}" />
          ...
        <SpanSummaryRow/>
    <mergingFields/>
    <summaries>
      <SpanSummaryRow summaryPlacement="last" label="Grand Total" labelDataField="Year" rowAttribute="{sumRowAttr_T}" cellAttribute="{sumTotalCellAttr}" />
        ...  
      <SpanSummaryRow/>
    <summaries/>
  <SpanSummaryCollection/>
</dataProvider>
...

© 2017 KoolChart. All rights reserved.