Windows Forms Report Viewer scaling issues on higher DPI
|Product||Progress® Telerik® Reporting|
|Project Type||Windows Forms|
|Report Viewer||Win Viewer|
When using Windows Forms Report Viewer on a machine with DPI scale factor higher than 96 (100%), Windows will resize the bitmap images in the application according to the current DPI value. This makes the report viewer and the report content blurry or be sized incorrectly in many common usage scenarios. Also, when printing the report, the application will scale the report contents incorrectly, because it cannot detect the current machine's DPI settings and the DPI value will always be reported as 96 dots per inch.
By default WinForms applications are declared as DPI Unaware. Declaring the application in which the Windows Forms Report Viewer is used as DPI aware application would resolve the issues.
The recommended approach is setting dpiAware element in your application to avoid further scaling, visual or interaction issues. To do so, you have to add a manifest file at the root of the application with the following content:
<?xml version="1.0" encoding="utf-8"?> <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <assemblyIdentity version="220.127.116.11" name="MyApplication.app"/> <asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" > <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"> <dpiAware>True/PM</dpiAware> </asmv3:windowsSettings> </asmv3:application> </asmv1:assembly>
For reference, check our demos located in Telerik Reporting installation folder, for example: C:\Program Files (x86)\Progress\Telerik Reporting