Textbox with HTML tags ignores bold tag

Stimulsoft Reports.JS discussion
Post Reply
imaltont
Posts: 12
Joined: Thu Dec 10, 2020 1:08 pm

Textbox with HTML tags ignores bold tag

Post by imaltont »

Hello.

A textbox with the property "Allow HTML Tags" set to true will in the .NET version properly render (some) HTML tags, like bold, italic, underscore, break etc. For the JS version this is also true, with the exception of bold, which seems to not render properly in the report viewer. It still renders properly when exported to Word or Excel, but not HTML or PDF (this cuts even more of the tags). Is this intended or the expected way things should work, or is there something wrong with the handling of the bold HTML tag in the JS viewer?
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Textbox with HTML tags ignores bold tag

Post by Lech Kulikowski »

Hello,

Please try to check the last release build.

Thank you.
imaltont
Posts: 12
Joined: Thu Dec 10, 2020 1:08 pm

Re: Textbox with HTML tags ignores bold tag

Post by imaltont »

Hello.

Latest stable release seems to fix it when saving/printing to PDF, but it does still not show in the report viewer. This one is also missing the dot prefix you usually see on list elements.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Textbox with HTML tags ignores bold tag

Post by Lech Kulikowski »

Hello,

Please send us a sample report for analysis.

Thank you.
imaltont
Posts: 12
Joined: Thu Dec 10, 2020 1:08 pm

Re: Textbox with HTML tags ignores bold tag

Post by imaltont »

Hello.

The actual-formatting image is from and older version, but the same problem was there in the newest report viewer as well. The newest were also missing the dots on the bullet list. The desired is from the .NET version. report-example.mrt is the same report that was rendered in both.
Attachments
report-example.mrt
(3.44 KiB) Downloaded 104 times
desired-html-formatting.png
desired-html-formatting.png (4.58 KiB) Viewed 1329 times
actual-formatting.png
actual-formatting.png (8.21 KiB) Viewed 1329 times
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Textbox with HTML tags ignores bold tag

Post by Lech Kulikowski »

Hello,

Please provide more detailed information on how to reproduce the issue.

Thank you.
Attachments
Screenshot 2023-06-16 173240.png
Screenshot 2023-06-16 173240.png (131.56 KiB) Viewed 1308 times
imaltont
Posts: 12
Joined: Thu Dec 10, 2020 1:08 pm

Re: Textbox with HTML tags ignores bold tag

Post by imaltont »

Hello,

I am also having some trouble reproducing it outside out application, so there is probably something going on with our setup. It seems the bold and lists are represented properly, both on the newest version and the older one we are currently running when doing a minimal setup. In our application, setting renderAfterCreate to true will also make the html tags render properly (but has other issues with our setup). There seems to be something going wrong between the initialization and the manual call to renderHtml, as just setting renderAfterCreate to false in a minimal example will still render properly.

I will come back with more when/if I manage to create a proper minimal example and/or a solution.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Textbox with HTML tags ignores bold tag

Post by Lech Kulikowski »

Hello,

Ok. Please let us know if you will have any additional information.

Thank you.
imaltont
Posts: 12
Joined: Thu Dec 10, 2020 1:08 pm

Re: Textbox with HTML tags ignores bold tag

Post by imaltont »

Hello,

The problem was an inherrited CSS font-weight from far back on the container the report was rendered to with renderHtml("containerName"). I don't know if it is the intended behavior or not for stimulsoft's rendering to overwrite such settings or not, but setting the container to have font-weight: bold fixed it in this case.
Lech Kulikowski
Posts: 6271
Joined: Tue Mar 20, 2018 5:34 am

Re: Textbox with HTML tags ignores bold tag

Post by Lech Kulikowski »

Hello,

Thank you for the information.
Post Reply