I'm designing a RDLC
report using Microsoft Report Designer
, where I have a Gauge inside a cell in a Tablix.
The problem I'm having is that the, no matter what I do, the Gauge gets cut off at the bottom.
Here's what I have in the designer:
And here is how it gets rendered in the final document:
As you can see: the bottom and right portion are cut off, and the scale labels and bar of the gauge are bigger than expected. It's like the Gauge is "zoomed in" (i.e.: rendered bigger than it should be) and then cut off.
Does anyone know why is this happening?
EDIT: Editing the question because I found the root of the problem, but I still don't know how to fix it (if it can be fixed). Here it goes:
A necessary clarification that I didn't report in the original question (I didn't think the problem would be related to something like this): I'm rendering the report to a ReportViewer
control inside a WPF
app.
After noticing that if I rendered the report directly to a PDF document the problem disappeared, I understood that it wasn't a problem with the report itself, but rather with the ReportViewer
. Some more digging and I discovered there is a known issue with ReportViewer
when the display DPI scaling is set to more than 100% in the Windows settings (which was my case: I was working on a 4k display set to 150% scaling)
There are some solutions here on StackOverflow and elsewhere that involve changing the app's DPI awareness, but they all seem to be targeted at Windows Forms applications. I didn't find anything that worked in my case, that is: a WPF application that is hosting ReportViewer
inside it through the WindowsFormsHost
control.
I'll leave the question open in case someone has a working solution for this particular case.