Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   .NET Database and Reporting (http://www.xtremevbtalk.com/-net-database-and-reporting/)
-   -   Report is shrinking fonts (http://www.xtremevbtalk.com/-net-database-and-reporting/328671-report-shrinking-fonts.html)

jpalatine 07-03-2017 08:41 AM

Report is shrinking fonts
Hi, I am using VS 2013 with reportviewer 11.0. My reports are shrinking to the left, e.g. when I design and show the report in reportviewer even though the body and report is 8.5/11 when it prints it will shrink the report to approximately 7/9. I even dummied up a report with one textbox and it did the same. Any suggestions, this is very consistent for this application, but other apps do not have this problem. Jim

jpalatine 07-05-2017 03:23 PM

OK I have found the solution but I need a fix. The problem was I had my panel resolution set to 125%, I am getting older. Which means my desktop was displaying data at 125% of their real size. So when I was in real time preparing the report the reportviewer tried to shrink the report which it did by the 25%. How can I tell reportviewer to stop shrinking the report is the display is set to anything other than 100%? Any help will be appreciated. JIM

Cerian Knight 07-05-2017 04:00 PM

I'm not well versed with reportviewer, but let us know what version of Windows you are using (which might be relevant to a workable solution)?

jpalatine 07-05-2017 06:50 PM

Windows 10

Cerian Knight 07-06-2017 07:39 AM

Have a look at this:

I was originally thinking about disabling display scaling for the exe, but it looks like the manifest recommendation is the best option.

jpalatine 07-06-2017 03:27 PM

Thanks for the link. OK, so I am not totally versed in the fix, where and how do I add this to my manifest. I am totally unfamiliar with this and I need some step by step instruction. Can you help? thanks, jim

jpalatine 07-06-2017 03:40 PM

if it helps this is what is in the current manifest. It appears that some change is needed.

<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.

<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />

Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
<requestedExecutionLevel level="asInvoker" uiAccess="false" />

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<!-- A list of the Windows versions that this application has been tested on and is
is designed to work with. Uncomment the appropriate elements and Windows will
automatically selected the most compatible environment. -->

<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->

<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->

<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->

<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->

<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->


<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>

<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->


Cerian Knight 07-06-2017 03:44 PM

Edit: Now I see your manifest has the DPI info, but also a note on setting 'EnableWindowsFormsHighDpiAutoResizing' which might be relevant.

For basic manifest creation, I see three solution strategies (and many documentation links) here:

Let me know if you need more help and I'll try to implement the DPI aware manifest myself (but don't have time at the moment).

jpalatine 07-08-2017 05:13 AM

Thank you. I was able to implement the DPI aware in the manifest. It actually made the other forms look rather dumpy. And more importantly it did not fix the reportviewer problem. The only way is to tell my users to set their dpi to 100%. This really looks like a problem with reportviewer. A big bug. But I thank you again for being so helpful. Jim

All times are GMT -6. The time now is 03:38 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.