CollectionDataSource Class

The data source component that loads a collection of business objects via the IObjectSpace.

Namespace: DevExpress.Persistent.Base.ReportsV2

Assembly: DevExpress.Persistent.Base.v18.2.dll

Declaration

public class CollectionDataSource :
    DataSourceBase,
    IList,
    ICollection,
    IEnumerable,
    ISupportCriteria,
    ISupportSorting,
    IListAdapter,
    ISupportInitialize,
    IServiceProvider,
    IBindingList,
    IObject,
    IListAdapterAsync,
    ISortingPropertyDescriptorProvider,
    ITypedList
Public Class CollectionDataSource
    Inherits DataSourceBase
    Implements IList,
               ICollection,
               IEnumerable,
               ISupportCriteria,
               ISupportSorting,
               IListAdapter,
               ISupportInitialize,
               IServiceProvider,
               IBindingList,
               IObject,
               IListAdapterAsync,
               ISortingPropertyDescriptorProvider,
               ITypedList

Use this report data source to create an XtraReport compatible with the Reports V2 Module. An example is provided in the Create Predefined Static Reports topic. The CollectionDataSource uses the IObjectSpace.CreateCollection method to load data.

Use CollectionDataSource when you do not need to display a large amount of data, because this component loads objects in their entirety, including fields that are not displayed in the report. If you experience performance issues, use ViewDataSource instead, and explicitly specify the required fields via the ViewDataSource.Properties collection.

Tip

You can use the ViewDataSource component instead of CollectionDataSource. The difference between these components is described in the Data Sources for Reports V2 topic.

Note

This component is available in the DX.18.2: XAF Data Sources for Reports group of the Visual Studio Toolbox.

Inheritance

Implements

DevExpress.Data.IListAdapter
DevExpress.XtraPrinting.Native.IObject
DevExpress.Data.IListAdapterAsync
See Also