RichText Content Not Display Properly

Stimulsoft Reports.NET discussion
kennynjc
Posts: 34
Joined: Thu Dec 14, 2017 5:24 am

Re: RichText Content Not Display Properly

Post by kennynjc »

Hi, It's Stimulsoft rectified this issue?

Our customers is fed-up with this. No way we has to set to Windows for every PC who using our report from Stimulsoft report engine.

We'd tested on DevExpress Report Engine without problem found and can display normal.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: RichText Content Not Display Properly

Post by Lech Kulikowski »

Hello,

Please check the last release build, were made some fixes.

If the issue still present, please run reports from the attachment and send us its preview.

Thank you.
Attachments
Test Dpi v4.mrt
(13.67 KiB) Downloaded 337 times
Test Dpi v3.mrt
(13.62 KiB) Downloaded 319 times
Test Dpi v2.mrt
(13.51 KiB) Downloaded 183 times
kennynjc
Posts: 34
Joined: Thu Dec 14, 2017 5:24 am

Re: RichText Content Not Display Properly

Post by kennynjc »

Hi,

There's some progress after using latest build (2018.2.1)
The issue will only gone by, right after open your Test Dpi.mrt and preview, then re-open the other report without close of the designer.

Refer Test Dpi v2 - Design Time
The outcome when first open Test Dpi v2 in design time, the problem remain until preview it. (Refer Test Dpi v2)

I also attached the result of Test Dpi v3 and v4
Attachments
Sample problem of output in RichTextEdit
Sample problem of output in RichTextEdit
Report.png (51.86 KiB) Viewed 3469 times
Report.mrt
Sample problem RichTextEdit Output format
(3.75 KiB) Downloaded 199 times
Test Dpi v4.png
Test Dpi v4.png (98.13 KiB) Viewed 3469 times
Test Dpi v3.png
Test Dpi v3.png (98.12 KiB) Viewed 3469 times
Test Dpi v2.png
Test Dpi v2.png (94.11 KiB) Viewed 3469 times
First open will see the problem but subsequently after preview, the problem gone if kept open other report format without close the designer
First open will see the problem but subsequently after preview, the problem gone if kept open other report format without close the designer
Test Dpi v2 - Design Time.png (93.4 KiB) Viewed 3469 times
kennynjc
Posts: 34
Joined: Thu Dec 14, 2017 5:24 am

Re: RichText Content Not Display Properly

Post by kennynjc »

Hello, any updates on the above issue?
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: RichText Content Not Display Properly

Post by HighAley »

Hello.

We need to specify if you use our Standalone Designer.
If you call the Designer from your application, you could use next code after starting your application.
This code redefines Graphics for RichText.

Code: Select all

Graphics grr = Graphics.FromImage(new Bitmap(1, 1));
grr.PageUnit = GraphicsUnit.Pixel;
grr.PageScale = 1f;
StiReport.GlobalRichTextMeasureGraphics = grr;
We use this code in the Test Dpi v2.mrt report before the Preview.

Thank you.
kennynjc
Posts: 34
Joined: Thu Dec 14, 2017 5:24 am

Re: RichText Content Not Display Properly

Post by kennynjc »

Hi, thanks for the code snippet. It works!

in VB.NET code:
Dim myReportGlobalRichTextMG As Graphics = Graphics.FromImage(New Bitmap(1, 1))
myReportGlobalRichTextMG.PageUnit = GraphicsUnit.Pixel
myReportGlobalRichTextMG.PageScale = 1.0F
StiReport.GlobalRichTextMeasureGraphics = myReportGlobalRichTextMG
Before include the code
Before include the code
Screen03.png (168.43 KiB) Viewed 3438 times
Before include the code
Before include the code
Screen03.png (168.43 KiB) Viewed 3438 times

Thank you.
Attachments
After included the code
After included the code
Screen02.png (170.88 KiB) Viewed 3438 times
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: RichText Content Not Display Properly

Post by Lech Kulikowski »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
kennynjc
Posts: 34
Joined: Thu Dec 14, 2017 5:24 am

Re: RichText Content Not Display Properly

Post by kennynjc »

Hi, it yield another problem whereby lot's of my customer getting the another problem after applied solution that been suggested.

Dim myReportGlobalRichTextMG As Graphics = Graphics.FromImage(New Bitmap(1, 1))
myReportGlobalRichTextMG.PageUnit = GraphicsUnit.Pixel
myReportGlobalRichTextMG.PageScale = 1.0F
StiReport.GlobalRichTextMeasureGraphics = myReportGlobalRichTextMG

Please advise.

Thanks.
Kenny
Attachments
No problem when preview on some others PC
No problem when preview on some others PC
ReportHeader Affected 02.png (138.75 KiB) Viewed 3365 times
Header with RichText alignment out on certain PC
Header with RichText alignment out on certain PC
ReportHeader Affected 01.png (229.93 KiB) Viewed 3365 times
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: RichText Content Not Display Properly

Post by Lech Kulikowski »

Hello,

Screenshots show that on the second computer system scaling is installed (most likely 175%).

Please try to run Test Dpi v2.mrt and send us results.

Also, you can try to use the following option:
StiDpiHelper.Reset(StiDpiHelper.DeviceCapsDpi, StiDpiHelper.GraphicsDpi, 96);

Thank you.
kennynjc
Posts: 34
Joined: Thu Dec 14, 2017 5:24 am

Re: RichText Content Not Display Properly

Post by kennynjc »

Hi,

Yes, I could reproduced the result by setting the scale to 150%.

Adding the below line doesn't help
StiDpiHelper.Reset(StiDpiHelper.DeviceCapsDpi, StiDpiHelper.GraphicsDpi, 96)

I attached the result for Test v2 DPI as per request.
Attachments
Test v2 DPI.png
Test v2 DPI.png (56.63 KiB) Viewed 3349 times
Post Reply