Databinding and XtraReport
I had a problem recently using object data sources in my XtraReports. I was assigning an object hierarchy to the DataSource property and was getting weird exceptions.
The problem is XtraReport does not handle well one object as a data source, it prefers to have a collection of objects.
The simple fix was to use a BindingSource as the data source and assign my object to the BindingSource's DataSource property. And yes, I should have been using a BindingSource from the start, I know :)
The problem is XtraReport does not handle well one object as a data source, it prefers to have a collection of objects.
The simple fix was to use a BindingSource as the data source and assign my object to the BindingSource's DataSource property. And yes, I should have been using a BindingSource from the start, I know :)
This is wonderful. Took me closer to locating and solving my issue than the whole XtraReport documentation and knowledge base! Mille fois merci.
ReplyDelete