1
Vote

how to bind the report to a DomainContext

description

Hello.
the binding works great for a Ilist
        this.report.ItemsSource = new CustomerCollection();
 
but not for LinQ ria binding, like the following
 
        NorthWindDomainContext ctx = new NorthWindDomainContext();
        report.ItemsSource = ctx.Customers.Where(p => p.Customer_Id == 2);
 
the ItemSource will not work because the report expects a System.Collections.IList
 
on a Database application , the report will need to be bound to a DataSource from the Database ?
 
Great codding, I like your codding practices .
I will improve on it to generate complete instance report..
It will be great to get in touch wit the creator

comments

oscar_agreda wrote Oct 16, 2010 at 4:14 PM

I fixed it, by by altering the Report.cs file
    /// <summary>
    /// Gets or sets the ItemsSource of the report.
    /// </summary>
    //public IList ItemsSource { get; set; }
    public IEnumerable ItemsSource { get; set; }