I have a report which binds to a dataSourceObject1. In that same report, I have a table at the bottom of the report (for something else I need to print along with the report) which binds to dataSourceObject2. However, when I try to print it, the report prints fine until it gets to the table, in which it says,
"An error has occurred while processing Table 'table1': An error has occurred while resolving 'objectDataSource2' data source: Object reference not set to an instance of an object."
Here is what is in my C# code for the data source that the report prints from:
Telerik.Reporting.ObjectDataSource objectDataSource1 = new Telerik.Reporting.ObjectDataSource();
objectDataSource1.DataMember = "PaymentReportResult";
objectDataSource1.DataSource = TransformReport(_paymentData);
objectDataSource1.Parameters.Add(new Telerik.Reporting.ObjectDataSourceParameter("search", typeof(ReportSearch), search));
I thought I could do the same with another datasource, adding it in the same way, however this does not work. Additionally, if I switch the dataSource of the table to the same as the report, it also fails. I figured that means I am missing something when it comes to specifically binding it to the table.