- 2 minutes to read
You can bind reports to a business object that serves as an object data source.
Use an object data source to prepare stored data to display in a report. For instance, in a multi-tier application where the data layer is separated from the presentation layer, you can bind a report to a .NET object that fetches data from a database.
An object can supply data in one of the following ways:
Include a public member (method or property) to return an object that implements the IEnumerable<T> interface.
Use the object's fields to supply data.
Use one of the following approaches to bind your report to an object data source:
If your object implements the IList, ITypedList, IBindingList, or IListSource interface, assign it to a report's XtraReportBase.DataSource. Note that these objects are non-serializable. In an End-User Report Designer, they are lost when users save a report. See Bind a Report to a List Object for more information.
The following demos use object data sources (the DevExpress Demo Center should be installed):
- Balance Sheet
- Profit and Loss Report
- Hierarchical Report
- Multi-Column Report
- Restaurant Menu
- Large Dataset
- Swiss QR Bill