Add StiText Components With Summary Function in Runtime
Posted: Tue Nov 22, 2016 2:00 pm
Hello!
I have a .Net procedure where i add stiText components to data columns band and fill their values according to specific criteria like this:
dataCol = new StiText();
dataCol.Name = "Data_" + col.RptField;
dataCol.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler( (sender, e) => { e.Value = p.GetValue(mainDataSource).ToString(); });
....
dataBand.Components.Add(dataCol);
How can I add StiText components with summary functions in the same way?
I tried to write GetValue like this:
footCol.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(
(sender, e) => { e.Value = "#%#{Sum(GroupHeader,fieldname)}"; e.StoreToPrinted = true;});
but it is not recognised as a function. Report displays the exact text (#%#{Sum(GroupHeader,fieldname)}")
I have a .Net procedure where i add stiText components to data columns band and fill their values according to specific criteria like this:
dataCol = new StiText();
dataCol.Name = "Data_" + col.RptField;
dataCol.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler( (sender, e) => { e.Value = p.GetValue(mainDataSource).ToString(); });
....
dataBand.Components.Add(dataCol);
How can I add StiText components with summary functions in the same way?
I tried to write GetValue like this:
footCol.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(
(sender, e) => { e.Value = "#%#{Sum(GroupHeader,fieldname)}"; e.StoreToPrinted = true;});
but it is not recognised as a function. Report displays the exact text (#%#{Sum(GroupHeader,fieldname)}")