Referencing IEnumerable object

pinbotpinbot Texas
edited 4:18AM in FastReport .NET
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

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.