New to Telerik ReportingStart a free 30-day trial

Windows Forms Application Overview

The Windows Forms Report Viewer control displays report documents that are generated by the report engine in WinForms applications and allows the end user to interact with it.

General appearance of the WinForms Report Viewer control

The Windows Forms Report Viewer renders buttons and inputs in the dedicated toolbar to allow the following interactions with the currently loaded report:

Button or InputAction
Navigate back in historyNavigates to a previous report after the Navigate to report interactive action was triggered.
Navigate forward in historyNavigates to a forward report after the Navigate back was used.
StopCancels the loading of the current report if the chosen parameters make it too heavy.
RefreshUpdates the current report with fresh data.
First pageDisplays the respective page of the current report.
Previous pageDisplays the respective page of the current report.
Current pageInput allows tracking the number of the displayed page and also displaying a particular page by entering its number.
Total pagesShows the number of pages of the current report.
Next pageDisplays the respective page of the current report.
Last pageDisplays the respective page of the current report.
Page Setup...Opens a dialog to set up the paper size, orientation, and margins of the current report. On closing, the dialog refreshes the report to match the preferences.
Switch to Print PreviewSwitches the report view between the Logical and Physical. Logical provides a convenient on-screen preview experience. Physical provides an exact preview of the eventual print operation.
PrintInitiates printing of the current report.
ExportInitiates an export operation. For more information, refer to the article on export formats.
ZoomAllows the user to view and change the zoom level of the report content.
Show/Hide parameters areaAllows the user to hide the report parameter inputs if any.
Show/Hide document mapAllows the user to hide the document map tree if map nodes were defined in the report.

System Requirements

  • Visual Studio 2012 or later.
  • .NET Framework 4 or above (.NET Framework 4 Client Profile is not supported)
  • .NET 8+

How It Works

The Windows Forms Report Viewer control requires an implementation as a composite of standard Windows Forms controls.

The toolbar of the Windows Forms Report Viewer is not customizable. To introduce custom commands or strip existing commands, hide the built-in toolbar and use the API to add a custom UI that triggers the commands on the Viewer.

Depending on the configuration of the Viewer, the report generates its pages through the Telerik Reporting Image Rendering as vector or raster images.

To process and render the report, use any of the following locations:

  • On the client machine with the report generation engine embedded in the desktop application.
  • On a server machine with the report generation engine embedded in a web application and exposed as Telerik Reporting REST Service.
  • On a Telerik Report Server instance.

Declaring the Application as DPI-Aware

When using Windows Forms Report Viewer on a machine with the Windows Vista (and later) operating system, and with a DPI scale factor higher than 96, the form content (labels, buttons, rendered report image, and so on) may render fuzzy, pixelated, or other types of visual artifacts. The reason for this behavior is that the application in which you are using the Windows Forms Report Viewer is not declared as DPI-aware.

It is recommended that you declare a DPI-aware application by adding a dpiAware element to its application manifest:

XML
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
	<asmv3:application>
	<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
		<dpiAware>True</dpiAware>
	</asmv3:windowsSettings>
	</asmv3:application>
</assembly>

For .NET applications, you need to ensure Windows 10 compatibility in the manifest file, as elaborated in the Microsoft article High DPI support in Windows Forms:

XML
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
	<application>
		<!-- Other Windows distributions may be added -->
		
		<!-- Windows 10 -->
		<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />	
	</application>
</compatibility>

As of Windows 10 Anniversary Update, the Windows runtime has improved the UX for Windows Forms applications that are not DPI-aware. However, this behavior may lead to incorrect calculations of the interactive item positions and it is recommended that you always declare the Windows Forms application as DPI-aware. For more information about DPI-aware desktop applications, refer to the High DPI Desktop Application Development on Windows MSDN article.

Keyboard Shortcuts

The Windows Forms Report Viewer supports the following keyboard and mouse commands, which use the CTRL key as a modifier that changes the applied action.

Mouse or key eventActionAction with the applied CTRL modifier
Mouse wheelScrolls up or down the document.Zooms in or out.
UpScrolls the view one row up.n/a
DownScrolls the view one row down.n/a
LeftScrolls the view one row left.n/a
RightScrolls the view one row right.n/a
Page upScrolls the view up.Scrolls the view to the top of the current page and then to the previous page.
Page downScrolls the view down.Scrolls the view to the bottom of the current page and then to the next page.
HomeScrolls the view to the left.Scrolls the view to the previous page.
EndScrolls the view to the right.Scrolls the view to the next page.
+ (Plus)n/aZooms in.
- (Minus)n/aZooms out.
Fn/aOpens the Search dialog.

See Also