Skip to content

DevExpress-Examples/reporting-wpf-mvvm-viewmodel-data-to-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reporting for WPF - How to Use ViewModel Data as Report Parameters in a WPF MVVM Application

This example demonstrates how to pass data from the ViewModel to a report. The row selected in the Data Grid is used as a report parameter. When the user selects a row and clicks a button, a new modal window is invoked. The window contains the DocumentPreviewControl that displays the report with the specified parameter applied.

Screenshot

The MainViewModelretrieves a list of employees from the database and tracks the currently selected employee. The MainViewModel defines the ShowPrintPreview command that instantiates a report with the current employee as a parameter and creates the DocumentPreviewViewModel view model instance that contains the current report. The command uses the DialogService to show the modal window with the report preview.

Files to Review

Documentation

More Examples