Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Collapse]Printing-Exporting
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamental Concepts
   [Expand]Concepts
   [Collapse]Examples
    [Collapse]Print Preview
      How to: Add a Print Preview to a Windows Forms Application
      How to: Preview, Export and Print a Windows Forms Control
      How to: Preview, Export and Print an XtraReport
      How to: Preview, Export and Print a Remotely Created Document
      How to: Show a Progress Bar during Document Generation
      How to: Execute Commands in the Print Preview
      How to: Change The Visibility of Toolbar Buttons and Menu Items in the Print Preview
      How to: Customize How a Document Is Exported from the Print Preview
      How to: Hide some of the Export Options in the Print Preview
      How to: Change the Measurement System Exposed in the Print Preview
    [Expand]Using Bricks
    [Expand]Using Printing Links
    [Expand]Page Header and Footer
    [Expand]Printing DevExpress Controls
    [Expand]Exporting
    [Expand]Miscellaneous
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Preview, Export and Print a Remotely Created Document

This tutorial illustrates how to use DocumentViewer to publish a document that is generated remotely by the DevExpress Report Server or the WCF report service.

To provide a Windows Forms application with print preview functionality for remotely generated documents, do the following.

Expanded Create a Windows Forms Application

To get started with this tutorial, create a Windows Forms Application with a print preview, similar to the one created in the following tutorial: How to: Add a Print Preview to a Windows Forms Application.

Expanded Publish a Document Generated by a WCF Report Service

This section of the document describes how to publish a document generated by a report service. To learn how to host a report service on a server-side application, refer to the Report Service topic.

The following steps are required to publish a document provided by a WCF report service.

  1. Click the DocumentViewer control's smart tag. In the invoked actions list, expand the Document Source drop-down menu. Expand the Standard Sources node in the invoked menu and select RemoteDocumentSource. The Remote Document Source wizard will be invoked.

  2. In the first step of the invoked wizard, select Report Service and click Next.

  3. In the next step, specify the URI for the report service hosted by the server-side application, as well as the name of the remote report you wish to display in the document viewer. Click Finish to exit the wizard.

Expanded Publish a Document Generated by a DevExpress Report Server

The following steps are required to publish a document provided by a DevExpress Report Server.

  1. Click the DocumentViewer control's smart tag. In the invoked actions list, expand the Document Source drop-down menu. Expand the Standard Sources node in the invoked menu and select RemoteDocumentSource. The Remote Document Source wizard will be invoked.

  2. In the first step of the invoked wizard, select Report Server and click Next.

  3. In the next step, specify the report server address and choose the authentication type.

    If you selected the Report Server Authentication option, you need to specify the user credentials as well. The credentials specified are used by the wizard to obtain the information required in later steps. At runtime, an end-user will be prompted for credentials before a document is obtained from the server.

    Click Next to proceed to the next wizard step.

  4. In the following step, select a report to display in the Document Viewer from the list of available reports and click Next.

  5. Specify a name for the newly added endpoint and click Finish to exit the wizard.

Expanded Launch the Application and View the Result

The client-side print preview is now capable of obtaining documents created on the application's server side.

To preview the document, run the application. Use the ribbon menu options to print and/or export the document.

How would you rate this topic?​​​​​​​