I'm very new to telerik reporting, I'm sure I'm missing something;
I have a simple report that has a text box
I have the following classes in the report.cs
I have a simple report that has a text box
I have the following classes in the report.cs
class DealerDataSource
{
public IEnumerable<
CalDealer
> GetDealerInfo()
{
DAdbDataContext xxx = new DAdbDataContext();
// Dealer deal = db.Dealers.First(d => d.DealerId == 2);
CalDealer cd = new CalDealer();
cd.Title = "Test";
yield return cd;
}
}
public class CalDealer
{
public string Title { get; set; }
}
When I add the data context and go to preview the report it gives the error of
"object reference not set to an instance of an object".
It compiles OK -
If I take out DAdbDataContext xxx = new DAdbDataContext(); the report previews fine.
I know the data context is good as I'm using it in the code behind of a page.
Thanks!!
Ron