Windows WinForms app and Reporting with DPI Scaling set to UNAWARE

1 Answer 184 Views
Report Viewer - WinForms
Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
Mark asked on 11 Jan 2023, 01:23 PM

We have an application (Windows Forms), that we have had to set DPI to UNWARE. The reason we have to set DPI to UNWARE, is our application behavior is weird when we set Aware or Aware Per Screen, as controls move, text gets truncated, dropdowns shrink, etc .   With that said, setting DPI to UNWARE, this solves the problem with all the win forms, however, this caused all our reports to have issues. All our reports are being shrunk on the page, with a huge amount of white space to the right and bottom of the page.  This is totally unacceptable to our customers as a lot of our report are designed to work for mailings and/or on pre-printed paper.   Our only solution, at this time, is to have our customers "SAVE AS PDF" and open the PDF and print from there.  Printing to PDF results in the same issue that is explained above.  

Now, we have played around with ways of setting DPI UNWARE and DPI AWARE, but we have been totally unsuccessful in getting our software to work as intended.  We set DPI Aware, reports work fine, but Win Forms are all messed up.  Set DPI Unware, Winforms are fine, but reports are an issue.   

 

Any help would be greatly appreciated.

 

Thank You

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 16 Jan 2023, 10:48 AM

Hello Mark,

My colleague Todor has already answered this question in a separate forum thread but in order to have the answer visible to more people, I will also copy it in this thread.

When you use an embedded Reporting engine in the Windows Forms Viewer, all renderings happen in the viewer and the DPI awareness is the same for all export formats.

To overcome the problem, you may use a Reporting REST Service with the viewer, so that the rendering happens in a separate project - see How to Use Windows Forms Report Viewer With REST Service.

You may check the KB article How to Display/Print Report Correctly from Windows Forms Viewer without Declaring the Entire Application as DPI-aware for more suggestions.

Please let us know if you have any other questions.

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Tags
Report Viewer - WinForms
Asked by
Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
Answers by
Dimitar
Telerik team
Share this question
or