Page 1 of 1

Create field in runtime

Posted: Wed Oct 31, 2012 10:41 am
by renathucazari
I have a report of address, where I use a DataBand, need to add new fields to the same only at runtime, for this I use the following code:

Stimulsoft.Report.Components.StiText campoDado = new Stimulsoft.Report.Components.StiText();
campoDado.Name = "textRuntime"
campoDado.Text = "{" + "Endereco.NovoCampo" + "}";
var pageHeader = ((Stimulsoft.Report.Components.StiPageHeaderBand)stiReportAgencia.GetComponentByName("PageHeaderBandDados"));
pageHeader.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] { campoDado });

this firing an exception: Invalid expression..

Re: Create field in runtime

Posted: Wed Oct 31, 2012 11:05 am
by HighAley
Hello.

Please, look at the RuntimeBuildReport project in the directory where our product was installed.

Thank you.