WPF - Reporting - Document Viewer and Report Designer (v18.2)

Reporting Team Blog
13 November 2018

Document Viewer – Word-Inspired Navigation Pane

We updated the WPF Document Viewer with a new Microsoft Word-inspired Navigation Pane, which is enabled by default in v18.2. The new pane combines the Document Map, Pages (this used to be Thumbnails) and Search Results panels in a tabbed interface:

WPF Document Viewer Navigation Pane

The functionality of this panel is similar to the one in Microsoft Word. For example, the search functionality operates across all tabs, highlights items in the Document Map and filters page thumbnails to display only those document pages that contain the keywords:

Navigation Pane Search Feature

The property DocumentPreviewControl.ShowNavigationPane defines whether the pane is visible. To switch back to the old toolbar appearance and show the Document Map, Thumbnails and Search panels separately, disable the property DocumentPreviewControl.UseOfficeInspiredNavigationPane in XAML:

<dxp:DocumentPreviewControl x:Name="documentPreview1"
  UseOfficeInspiredNavigationPane="False"></dxp:DocumentPreviewControl>

This property not only changes the dock panel appearance, but also affects the toolbar items. Separate items per panel are the old style (UseOfficeInspiredNavigationPane=False), a single Navigation Pane item is the new style (UseOfficeInspiredNavigationPane=True) and the new default.

Document Viewer Toolbar

The DocumentPreviewControl has the property NavigationPaneSettings to control the behavior in detail:

  • NavigationPaneSettings.ShowDocumentMapTab – Show/hide the Document Map tab
  • NavigationPaneSettings.ShowPagesTab – Show/hide the Pages tab
  • NavigationPaneSettings.ActiveTab – Define or retrieve the currently visible tab
  • NavigationPaneSettings.UseCaseSensitiveSearch – Search option
  • NavigationPaneSettings.SearchWholeWords – Search option

Report Designer – Query Builder Light Mode

If you have used our WinForms Report Designer, you may already be familiar with the Light Mode of the Query Builder available on that platform. In a nutshell, this mode disables some of the more complex options provided by the Data Source Wizard in order to make the wizard more accessible to users who don’t know much about RDMBS structures.

In v18.2, the Query Builder in the WPF Report Designer supports Light mode. Just set QueryBuilderLight to True in your XAML:

...
<dxrd:ReportDesigner Name="reportDesigner1"
  DataSourceWizardSettings="{dxda:DataSourceWizardSettings
    SqlWizardSettings={dxda:SqlWizardSettings QueryBuilderLight=True}}"/>

As an example of the limited feature set the Query Builder offers in this mode, the SQL editing pane is removed from the UI as a result:

Query Builder Comparison

An extra feature of the Light mode is the support for an IDisplayNameProvider implementation to customize table and column names, or suppress them from the UI. You can see this in the screenshot above, where table and field names have the postfix _Custom. Details about this functionality can be found here – you need a simple class that implements the two methods of the interface. Then you can apply the implementation to the Report Designer by adding an entry to the ServicesRegistry like this:

...
xmlns:dxda="http://schemas.devexpress.com/winfx/2008/xaml/dataaccess"
xmlns:dxrud="http://schemas.devexpress.com/winfx/2008/xaml/reports/userdesigner"
xmlns:dxdw="clr-namespace:DevExpress.DataAccess.UI.Wizard;assembly=DevExpress.DataAccess.v18.2"
xmlns:dxdata="clr-namespace:DevExpress.Data;assembly=DevExpress.Data.v18.2"
...

<dxrd:ReportDesigner Name="reportDesigner1">
  <dxrd:ReportDesigner.DataSourceWizardSettings>
  <dxdw:DataSourceWizardSettings
    SqlWizardSettings="{dxdw:SqlWizardSettings QueryBuilderLight=True}"/>
  </dxrd:ReportDesigner.DataSourceWizardSettings>
  <dxrd:ReportDesigner.ServicesRegistry>
    <dxda:TypeEntry ServiceType="{x:Type dxdata:IDisplayNameProvider}"
      ConcreteType="{x:Type local:MyCustomNameProvider}" />
  </dxrd:ReportDesigner.ServicesRegistry>
</dxrd:ReportDesigner>

Your Feedback Counts

What do you think about these improvements to our WPF Reporting tools? Is anything missing in the product line? To give us some quick feedback, please submit your answers to this short survey:

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.