Skip to main content

StandaloneReportManagerService

  • 3 minutes to read

StandaloneReportManagerService is an IReportManagerService implementation that allows you to convert a data source into a XtraReport object.

StandaloneReportManagerService

An example illustrating how to declare the StandaloneReportManagerService is shown below.

<ListBox Name="listBox" ItemsSource="{Binding Items}">
    <dxmvvm:Interaction.Behaviors>
        <dxrudex:StandaloneReportManagerService x:Name="EmployeesReportService" DataSource="{Binding ElementName=listBox, Path=ItemsSource}"/>
    </dxmvvm:Interaction.Behaviors>
</ListBox>

Use one the following approaches to manage reports of the attached service:

Example

View Example

using DevExpress.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StandaloneReportManagerServiceExample.ViewModels {
    public class MainViewModel : ViewModelBase {
        public List<ItemViewModel> Items {
            get { return GetProperty(() => Items); }
            set { SetProperty(() => Items, value); }
        }

        public MainViewModel() {
            Items = new List<ItemViewModel>() {
                new ItemViewModel() { ID = 1, Name = "First" },
                new ItemViewModel() { ID = 2, Name = "Second" },
                new ItemViewModel() { ID = 3, Name = "Third" },
                new ItemViewModel() { ID = 4, Name = "Fourth" },
            };
        }
    }

    public class ItemViewModel : ViewModelBase {
        public string Name {
            get { return GetProperty(() => Name); }
            set { SetProperty(() => Name, value); }
        }
        public int ID {
            get { return GetProperty(() => ID); }
            set { SetProperty(() => ID, value); }
        }
    }
}
See Also