private ReportCell[][] GetTransposedHeaderCells(SpannableHeader[,] header) { int rowsCount = header.GetLength(0); int columnsCount = header.GetLength(1); ReportCell[] row = new ReportCell[rowsCount]; List <ReportCell[]> result = new List <ReportCell[]>(); for (int columnIndex = 0; columnIndex < columnsCount; columnIndex++) { for (int rowIndex = 0; rowIndex < rowsCount; rowIndex++) { row[rowIndex] = header[rowIndex, columnIndex].Cell; if (row[rowIndex] != null) { int span = row[rowIndex].ColumnSpan; row[rowIndex].ColumnSpan = row[rowIndex].RowSpan; row[rowIndex].RowSpan = span; } } result.Add(row.ToArray()); } return(result.ToArray()); }
private ReportCell[][] GetHeaderCells(SpannableHeader[,] header) { int rowsCount = header.GetLength(0); int columnsCount = header.GetLength(1); ReportCell[] row = new ReportCell[columnsCount]; List <ReportCell[]> result = new List <ReportCell[]>(); for (int rowIndex = 0; rowIndex < rowsCount; rowIndex++) { for (int columnIndex = 0; columnIndex < columnsCount; columnIndex++) { row[columnIndex] = header[rowIndex, columnIndex].Cell; } result.Add(row.ToArray()); } return(result.ToArray()); }