DBRichText Text Size in ReportBuilder

General TRichView support forum. Please post your questions here
Post Reply
DavidCarroll
Posts: 4
Joined: Fri Jul 23, 2021 4:22 am

DBRichText Text Size in ReportBuilder

Post by DavidCarroll »

We have a problem with DBRichText in a ReportBuilder subreport. There are two ways for the user to log in and the problem only occurs in one of them. When a user name and password are used, there are not any problems with text size. When the user logs in a second way, The rich text is incredibly small. In the second method, the user is logged in automatically if their user name is identical to the name of the user account used to log in to Windows. The InternalPixelsPerInch property seems to be the cause. How can we fix this?

Embarcadero® Delphi 10.4 Version 27.0.38860.1461
ReportBuilder Enterprise Edition Version 20.03 Build 182
TRichView v19.1.2


Thanks,

David Carroll
Manufacturing Asset Solutions
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: DBRichText Text Size in ReportBuilder

Post by Sergey Tkachenko »

Did you modify InternalPixelsPerInch property? I highly recommend to leave it at default value, 1440.
DavidCarroll
Posts: 4
Joined: Fri Jul 23, 2021 4:22 am

Re: DBRichText Text Size in ReportBuilder

Post by DavidCarroll »

I was going to send images last night, but we changed TPPRICHVIEWREFCANVASPPI to 120 and it made the text too large. When I changed it back to 96, the text size did not decrease. How do I get the text back to the size it was?

The InternalPixelsPerInchproperty is at 1440. Yesterday, before we changed the value of TPPRICHVIEWREFCANVASPPI, changing the InternalPixelsPerInch property to a lower value, would increase the size. Now, It does not seem to affect the size.

Do you know why using a username the same as the Windows account would cause the report to display rich text differently?
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: DBRichText Text Size in ReportBuilder

Post by Sergey Tkachenko »

Make sure that ppRichView.UsePrinterResolution = False.
(I am not sure if this option is processed correctly in the last version of ppRichView)
DavidCarroll
Posts: 4
Joined: Fri Jul 23, 2021 4:22 am

Re: DBRichText Text Size in ReportBuilder

Post by DavidCarroll »

Sergey,

The value of ppRichView.UsePrinterResolution is False. I changed to True just to see how it affected the report. The text was very small like it was originally. When I change the value of TPPRICHVIEWREFCANVASPPI, the text size changes but is never returns to the reduced size it was originally.

We are scheduled to release an update tomorrow and if it is not resolved, our leads developer plans to set TPPRICHVIEWREFCANVASPPI to 96.

I am planning on staying up for several more hours. Can I talk you into joining a short 10 or 15 minutes Microsoft Teams meeting and look at the report together? I have 20 years of experience with Delphi and 2 years with Turbo Pascal. I am a long-time ReportBuilder user, but minimal experience with TrichView. I may be overlooking something simple that you will see.

Cheers,

David
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: DBRichText Text Size in ReportBuilder

Post by Sergey Tkachenko »

By design, InternalPixelsPerInch must not affect font size.
This DPI is used when formatting text internally. When drawing/printing, sizes must be converted from InternalPixelsPerInch to the screen/printer resolution.

I just made tests, with 2 ppRichView, one with InternalPixelsPerInch = 1440, another one with 96, in different screen DPI.
I tested 96 dpi, 144 dpi no-dpi-aware-application, 144 dpi per-monitor-v2-dpi-awareness.
In all tests, the both ppRichViews work identically.

Is the problem only in scaling text, does it also affect other content (pictures)?

I am afraid solution for this problem will not be fast.
First, if possible, create a sample project reproducing this problem and send to me.
Next, if I will not be able to solve the problem with a test project, we can organize a remote desktop session.
DavidCarroll
Posts: 4
Joined: Fri Jul 23, 2021 4:22 am

Re: DBRichText Text Size in ReportBuilder

Post by DavidCarroll »

Sergey,

I understand. Thanks for the effort. You have provided me with a lot of good information. I do not know if it affects other content. I am mostly a messenger on this problem assisting others who are busy. I will discuss the information you have provided with the team. I will check other content and create a sample project. A sample project outside of the application is an excellent idea. The simplification of a problem often gives a clear view of the solution and leads to success. If we find a solution, I will share it with you. If we don't, I will reach out to you for additional assistance.

I see you have TRichView for Firemonkey now. When time permits I will evaluate it. Our customers have want rich text on mobile platforms and the tools available are limited.

Have a nice day and thanks once again.

David
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: DBRichText Text Size in ReportBuilder

Post by Sergey Tkachenko »

In any case, InternalPixelsPerInch does affect content of ppRichView. It may affect only on displaying its content.
And ppDBRichView is a view-only object, it cannot affect DB content.
Post Reply