Referencing IEnumerable object
pinbot
Texas
I'm using RegisterData in my FR.NET web site to register some Dynamics CRM data
I have a pre-existing .frx file I want to modify to display the data in the data band.
Here is the code:
DataCollection<Entity> details = _orgService.RetrieveMultiple(detailExp).Entities;
FastReport.Utils.Config.WebMode = true;
FastReport.Report Rpt = new FastReport.Report();
Rpt.Load(this.Page.Server.MapPath("./bin/App_Data/Quote.Frx"));
Rpt.RegisterData(details, "Details",3);
Rpt.GetDataSource("Details").Enabled = true;
FastReport.DataBand band=((FastReport.DataBand) Rpt.FindObject("Data1"));
band.DataSource=Rpt.GetDataSource("Details");
FastReport.TextObject desc = ((FastReport.TextObject)Rpt.FindObject("Text11"));
if (desc != null) desc.Text = "[Details.ProductDescription]";
Text11 is a textbox in the DataBand Data1.
When I run the report I get the message:
Server Error in '/' Application.
(Text11): Error CS0103: The name 'Details' does not exist in the current context
Thanks
I have a pre-existing .frx file I want to modify to display the data in the data band.
Here is the code:
DataCollection<Entity> details = _orgService.RetrieveMultiple(detailExp).Entities;
FastReport.Utils.Config.WebMode = true;
FastReport.Report Rpt = new FastReport.Report();
Rpt.Load(this.Page.Server.MapPath("./bin/App_Data/Quote.Frx"));
Rpt.RegisterData(details, "Details",3);
Rpt.GetDataSource("Details").Enabled = true;
FastReport.DataBand band=((FastReport.DataBand) Rpt.FindObject("Data1"));
band.DataSource=Rpt.GetDataSource("Details");
FastReport.TextObject desc = ((FastReport.TextObject)Rpt.FindObject("Text11"));
if (desc != null) desc.Text = "[Details.ProductDescription]";
Text11 is a textbox in the DataBand Data1.
When I run the report I get the message:
Server Error in '/' Application.
(Text11): Error CS0103: The name 'Details' does not exist in the current context
Thanks