Skip to main content

Extra column header in crosstab table.

Comments

2 comments

  • Glyn McKenna

    Hi Ton,

    I've inserted a code block below that should give you an idea - you can copy and paste the text into an empty Logi Info report to view it a little more easily. I'll email or link a file to a working example. Let me know if you're looking to do something different

    Regards

    Glyn

    <Division Class="panel-body" HtmlDiv="True" ID="divPanelBody">
    <CrosstabTable AjaxPaging="True" AltRowClass="ThemeAlternatingRow TD" CaptionClass="ThemeTextLarger, ThemeMarginLarge" ID="XTab4Multi" Width="100" WidthScale="%" TableBorder="1" ColumnHeaderClass="ThemeContainerBordered">
    <DataLayer Type="Linked" LinkedDataLayerID="dllData" ID="linkData">
    <CompareFilter CompareType="=" CompareValue="Condiments" DataColumn="CategoryName" DataType="Text" />
    <CalculatedColumn Formula="@Data.UnitPrice~*@Data.Quantity~*(1-@Data.Discount~)" ID="ODTotal" />
    <CrosstabFilter CrosstabColumn="OrderYear" CrosstabLabelColumn="ProductName" CrosstabValueColumn="Quantity" CrosstabValueFunction="Sum" ID="CrosstabFilter4">
    <ExtraCrosstabLabelColumn CrosstabLabelColumn="CompanyName" ID="CompanyName" />
    <ExtraCrosstabValueColumn CrosstabValueColumn="OrderTotals" CrosstabValueFunction="Sum" ID="ODTotal" />
    <ExtraCrosstabCalculatedColumn ErrorResult="0" Formula="@Data.rdCrosstabValue-ODTotal~/@Data.rdCrosstabValue~" ID="UnitPrice" />
    <CrosstabRowSummaryColumn Function="Sum" ID="crsSumQuantity" />
    <CrosstabRowSummaryColumn ExtraCrosstabValueColumnID="ODTotal" Function="Sum" ID="crsSumODTotal" />
    </CrosstabFilter>
    <SortFilter DataType="Text" SortColumn="CompanyName" />
    </DataLayer>
    <HeaderRow HeaderPosition="Top" ID="HeaderRow" IdeDisplayStatus="Collapsed">
    <Column ColSpan="2" ID="colSpacer" RowSpan="">
    <Spaces />
    </Column>
    <CrosstabTableHeaderColumn Class="fontHeaderRow" ColSpan="3" ID="colCrossTabHeader">
    <Label Caption="@Data.rdCrosstabColumn~" ID="lblRdCrosstabColumn" />
    </CrosstabTableHeaderColumn>
    <Column Class="fontHeaderRow" ColSpan="3" ID="colTotal">
    <Label Caption="Total" ID="lblTotal" />
    </Column>
    </HeaderRow>
    <CrosstabTableLabelColumn Class="ThemeAlignLeft" Header="Supplier" ID="colCompanyName">
    <Label Caption="@Data.CompanyName~" ID="lblCompanyName" />
    <HideDuplicates DataColumn="CompanyName" />
    </CrosstabTableLabelColumn>
    <CrosstabTableLabelColumn Class="ThemeAlignLeft" Header="Product Name" ID="colProductName">
    <Label Caption="@Data.ProductName~" ID="lblProductName" />
    </CrosstabTableLabelColumn>
    <CrosstabTableValueColumns Class="ThemeAlignRight" Header="Total Sales" ID="colODTotal">
    <Label Caption="@Data.rdCrosstabValue-ODTotal~" Format="Currency" ID="lblODTotal" />
    <DataColumnSummary DataColumn="rdCrosstabValue-ODTotal" Function="Sum" ID="dcsSumODTotal" />
    </CrosstabTableValueColumns>
    <CrosstabTableValueColumns Class="ThemeAlignRight" Header="Units Sold" ID="colQuantity" Width="50" WidthScale="px">
    <Label Caption="@Data.rdCrosstabValue~" Format="###,###,##0" ID="lblQuantity" />
    <DataColumnSummary DataColumn="rdCrosstabValue" Function="Sum" ID="dcsSumQuantity" />
    </CrosstabTableValueColumns>
    <CrosstabTableValueColumns Class="ThemeAlignRight" Header="Avg Price" ID="colAvgUnitPrice" Width="50" WidthScale="px">
    <Label Caption="@Data.rdCrosstabValue-UnitPrice~" Format="Currency" ID="lblUnitPrice" />
    </CrosstabTableValueColumns>
    <CrosstabTableLabelColumn Class="ThemeAlignRight" Header="Total Sales" ID="RowTotal">
    <Label Caption="@Data.crsSumODTotal~" Format="Currency" ID="lblcrsSumODTotal" />
    <DataColumnSummary DataColumn="crsSumODTotal" Function="Sum" ID="dcsSumRowODTotal" />
    </CrosstabTableLabelColumn>
    <CrosstabTableLabelColumn Class="ThemeAlignRight" Header="Units Sold" ID="RowTotalQuantity" Width="50" WidthScale="px">
    <Label Caption="@Data.crsSumQuantity~" Format="###,###,##0" ID="lblcrsSumQuantity" />
    <DataColumnSummary DataColumn="crsSumQuantity" Function="Sum" ID="dcsSumRowSums" />
    </CrosstabTableLabelColumn>
    <CrosstabTableLabelColumn Class="ThemeAlignRight" Header="Avg Price" ID="RowTotalUnitPrice" Width="50" WidthScale="px">
    <Label Caption="=@Data.crsSumODTotal~/@Data.crsSumQuantity~" ErrorResult="0" Format="Currency" ID="lblAvgUnitPrice" />
    </CrosstabTableLabelColumn>
    <SummaryRow Caption="Totals: " Class="ThemeBold" ID="SummaryRow" IdeDisplayStatus="Collapsed">
    <Column ColSpan="2" ID="cellTotal">
    <LineBreak />
    <Label Caption="Totals: " ID="lblTotals" />
    </Column>
    <CrosstabTableSummaryColumn Class="ThemeAlignRight" ColSpan="1" ID="cellsumODTotal">
    <LineBreak />
    <Label Caption="@Data.dcsSumODTotal~" Format="Currency" ID="lblsumODTotal" />
    </CrosstabTableSummaryColumn>
    <CrosstabTableSummaryColumn Class="ThemeAlignRight" ColSpan="1" ID="cellsumQuantity">
    <LineBreak />
    <Label Caption="@Data.dcsSumQuantity~" Format="###,###,##0" ID="lblsumQuantity" />
    </CrosstabTableSummaryColumn>
    <CrosstabTableSummaryColumn Class="ThemeAlignRight" ColSpan="1" ID="cellsumUnitPrice">
    <LineBreak />
    <Label Caption="=@Data.dcsSumODTotal~/@Data.dcsSumQuantity~" ErrorResult="0" Format="Currency" ID="lblsumUnitPrice" />
    </CrosstabTableSummaryColumn>
    <Column Class="ThemeAlignRight" ID="cellsumRowSumODTotal">
    <LineBreak />
    <Label Caption="@Data.dcsSumRowODTotal~" Format="Currency" ID="lblsumRowSumODTotal" />
    </Column>
    <Column Class="ThemeAlignRight" ID="cellsumRowSum">
    <LineBreak />
    <Label Caption="@Data.dcsSumRowSums~" Format="###,###,##0" ID="lblsumRowSum" />
    </Column>
    <Column Class="ThemeAlignRight" ID="cellsumRowSumUnitPrice">
    <LineBreak />
    <Label Caption="=@Data.dcsSumRowODTotal~/@Data.dcsSumRowSums~" ErrorResult="0" Format="Currency" ID="lblSumRowSumUnitPrice" />
    </Column>
    </SummaryRow>
    </CrosstabTable>
    </Division>
    0
  • Glyn McKenna

    Hi Ton,

    Here's a box folder link to a working report definition: 

    https://logianalytics.box.com/s/zdlp7bbdsl3psd2gdzerfxpasr4brqup

    Regards

    Glyn

    0

Please sign in to leave a comment.