Code: Select all
StiTable table = new StiTable();
table.Name = "Table1";
table.ColumnCount = 6;
table.RowCount = 3;
table.HeaderRowsCount = 1;
table.FooterRowsCount = 1;
table.Width = page.Width;
table.Height = page.GridSize * 12;
table.DataSourceName = String.Format("{0}", tblDR.TableName);
page.Components.Add(table);
table.CreateCell();
table.TableStyle = StiTableStyle.Style11;
--- --- --- --- --- ---
|c1|c2|c3|c4|c5|c6| <---Header
--- --- --- --- --- ---
| 1| 2 | 3| 4 | 5 |6 | <---Data
--- --- --- --- --- ---
| 1| 2 | 3| 4 | 5 |6 | <---Data
--- --- --- --- --- ---
| 2| 4 | 6| 8 |10|12| <---Footer
--- --- --- --- --- ---
Is it possible to programatically join/Merge the last 2 cells in the footer in order to display a Total.Sum of the last 2 columns of the data rows like below:
--- --- --- --- --- ---
|c1|c2|c3|c4|c5|c6| <---Header
--- --- --- --- --- ---
| 1| 2 | 3| 4 | 5 |6 | <---Data
--- --- --- --- --- ---
| 1| 2 | 3| 4 | 5 |6 | <---Data
--- --- --- --- --- ---
| 2| 4 | 6| 8 |__22| <---Footer
--- --- --- --- --- ---