Hello,
I create a Report on runtime with ;
for (int i = 0; i <= ds.Tables[0].Columns.Count - 1; i++)
{
var tableGroupColumn = new TableGroup();
tableGroupColumn.Name = i.ToString();
table1.ColumnGroups.Add(item: tableGroupColumn);
txtGroup = new HtmlTextBox
{
Size = new SizeU(Unit.Inch(2.1), Unit.Inch(0.3)),
Value = ds.Tables[0].Columns[i].ColumnName,
Style =
{
BackgroundColor = System.Drawing.Color.FromArgb(59,100,141),
Color = System.Drawing.Color.White,
BorderStyle = { Default = BorderType.Solid },
TextAlign = HorizontalAlign.Center,
VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle,
BorderColor = { Default = Color.Black }
},
StyleName = "Corporate.TableHeader",
};
tableGroupColumn.ReportItem = txtGroup;
txtTable = new HtmlTextBox()
{
Size = new SizeU(Unit.Inch(2.2), Unit.Inch(0.3)),
Value = "=Fields.[" + ds.Tables[0].Columns[i].ColumnName + "]",
//Value = data.Rows[rowIndex][i].ToString(),
Style =
{
BorderStyle = { Default = BorderType.Solid },
TextAlign = HorizontalAlign.Center,
VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle,
BorderColor = { Default = Color.Black }
},
StyleName = "Corporate.TableHeader",
};
table1.Body.SetCellContent(0, columnIndex: i, item: txtTable);
//rowIndex++;
table1.Items.AddRange(items: new ReportItemBase[] { txtTable, txtGroup });
}
and i want to add a Total with sum function but i cant do this.