Hi
I configure the report with no DataSource and the following NeedDataSource event:
private void AnalisiSconfinamenti_NeedDataSource(object sender, EventArgs e) | |
{ | |
WSClass ws = new WSClass(); | |
List<Analisi> elenco = null; | |
elenco = ws.analisi(9, new DateTime(2008, 5, 20), new DateTime(2009, 5, 20)); | |
(sender as Telerik.Reporting.Processing.Report).DataSource = elenco; | |
} |
The method ws.analisi is the following
public List<Analisi> analisi(int id_cliente, DateTime fromData, DateTime toData) | |
{ | |
UnicaDataContext db = new UnicaDataContext(); | |
//linq query to db | |
var elencoFC = from e in db.Analisis ............ | |
return elencoFC.toList(); | |
} |
When I preview the report I have the follow error:
Object reference not set to an instance of an object.
Where is the problem?
Thanks
Lorenzo