Create field in runtime

Stimulsoft Reports.NET discussion
Post Reply
renathucazari
Posts: 15
Joined: Fri Jan 20, 2012 9:06 am
Location: Brasil

Create field in runtime

Post 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..
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Create field in runtime

Post by HighAley »

Hello.

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

Thank you.
Post Reply