I had the same error, but I encountered it when using the object as a data source for the report. I had the following code:
var myObj = new MyDataObject(); cr.Load(@"C:\report.rpt"); cr.SetDataSource(myObj);
and got the same error.
Changing the SetDataSource line as follows:
cr.SetDataSource(new [] { myObj });
helped, and now it works correctly. In other words, try wrapping your object in an array. If you use a list, try first converting it to an array (use the .ToArray () method).
source share