Hi there,
the goal that I need to reach is to hide a specific group total row in a crosstab report, based on the value of a field.
With reference to the attached picture, I want that row number 3 (the first group total row) is not visible.
Just to be more clear, it is like if in the "Product Sales per Period" sample report I want to hide the "totals" row when the main category is "Accessories".
I've tried in code behind with this, but only the color style works:
I've tried to use a Filtering expression for the crosstab, but if apply an expression on the main category field, obviously the WHOLE group gets hidden/displayed, not just the totals row of that group. (NOTE: using the operator Not Like generates an error when previewing, while the same filter with Like operator works. Is it correct ? - see attachment 2)
Please explain me how can I have control over the row of a crosstab, maybe with an example.
I'm using Reporting Q2_2011_v5_1_11_713
TIA
Ubaldo
the goal that I need to reach is to hide a specific group total row in a crosstab report, based on the value of a field.
With reference to the attached picture, I want that row number 3 (the first group total row) is not visible.
Just to be more clear, it is like if in the "Product Sales per Period" sample report I want to hide the "totals" row when the main category is "Accessories".
I've tried in code behind with this, but only the color style works:
Private Sub Crosstab1_ItemDataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Crosstab1.ItemDataBound
Dim table As Telerik.Reporting.Processing.Table = DirectCast(sender, Telerik.Reporting.Processing.Table)
For Each row As Telerik.Reporting.Processing.TableRow In table.Rows
If row.Index = 3 Then
For colIndex As Integer = 0 To table.Columns.Count - 1
Dim cell As Telerik.Reporting.Processing.ITableCell = row.GetCell(colIndex)
If cell.RowIndex = row.Index AndAlso cell.ColumnIndex = colIndex Then
Dim item As Telerik.Reporting.Processing.ReportItem = cell.Item
If TypeOf (item) Is Processing.TextBox Then
Dim txt As Processing.TextBox = DirectCast(item, Processing.TextBox)
item.Visible = False 'does not work
txt.Visible = False 'does not work
txt.Height = New Telerik.Reporting.Drawing.Unit(0) 'does not work
txt.Style.Color = Color.Red 'it works !
End If
Else
' Do nothing. This is part of a merged table cell
End If
Next
End If
Next
End Sub
I've tried to use a Filtering expression for the crosstab, but if apply an expression on the main category field, obviously the WHOLE group gets hidden/displayed, not just the totals row of that group. (NOTE: using the operator Not Like generates an error when previewing, while the same filter with Like operator works. Is it correct ? - see attachment 2)
Please explain me how can I have control over the row of a crosstab, maybe with an example.
I'm using Reporting Q2_2011_v5_1_11_713
TIA
Ubaldo