Skip to content

Bind the DocumentSource property to the report source in the ViewModel

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/reporting-wpf-mvvm-show-report-document-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reporting for WPF - How to Use the DocumentPreviewControl in a WPF MVVM Application to Preview a Report

This example demonstrates how to bind the DocumentPreviewControl.DocumentSource property to the report source in the ViewModel. The project implements a command to show the report preview in a modal window. In this example the reports are stored in the SQLite database.

Screenshot

The ReportCatalogViewModel view model retrieves reports from a database and defines the following commands:

  • ShowReport. Assigns a report instance to the view model property bound to the DocumentViewerControl.DocumentSource property.
  • ShowPreviewInNewWindow. Creates the DocumentPreviewDialogViewModel view model instance that contains the current report. Uses the DialogService to show the modal window with the report preview.

Files to Review

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)