If I create a report using an existing dataset I get "Object reference not set to an instance of an object." when previewing. If I create a new dataset with the report wizard everything works ok.
I'm connecting the SQL Server.
Any ideas?
Thanks!
1 Answer, 1 is accepted
0
Steve
Telerik team
answered on 09 Jul 2009, 07:34 AM
Hello Jorge,
We've not been able to reproduce such an issue on our end. Note that when you're using existing dataset not created by our report wizard, you should manually add it to the report and take care of filling it in i.e.:
try
{
this.MyDataSet1TableAdapter1.Fill(this.MyDataSet1.MyDataSet1Table);
}
catch (System.Exception ex)
{
// An error has occurred while filling the data set. Please check the exception for more information.
System.Diagnostics.Debug.WriteLine(ex.Message);
}
You can wire up a web/win application and hook up the report in code behind like this:
ReportViewer.Report = new MyReport();
This way you should be able to set breakpoint in the report and figure out where the problem lies.