RichText is cut off at the right side

Posted by: mmoroz on 12 June 2023, 4:21 am EST

    • Post Options:
    • Link

    Posted 12 June 2023, 4:21 am EST - Updated 12 June 2023, 4:28 am EST

    I have ntml markup for output which I use in RichText. If you use centering on the left side, then everything is fine, but if you center the text on the right side, then part of the text is cut off. Centering occurs with the help of styles in the markup. The required fonts are installed.

    template.rdlx-json.zip

  • Posted 12 June 2023, 10:10 pm EST

    I noticed if I remove the ‘sans-serif’ font family the RichText is displayed fine? Why?

    I think it’s not good practice to remove ‘sans-serif’.

    <p style="text-align: right;font-size: 9pt;font-family: Verdana, sans-serif"><strong>Kreuzbeck</strong></p><p style="text-align: right;font-size: 9pt;font-family: Verdana, sans-serif">Hauptstrasse 1</p><p style="text-align: right;font-size: 9pt;font-family: Verdana, sans-serif">CH 8048 Zürich</p> <p style="text-align: right;font-size: 9pt;font-family: Verdana, sans-serif">Tel. 044 / 297 05 05</p> <p style="text-align: right;font-size: 9pt;font-family: Verdana, sans-serif">info@kreuzbeck.ch</p><p style="text-align: right;font-size: 9pt;font-family: Verdana, sans-serif">www.kreuzbeck.ch</p>

  • Posted 13 June 2023, 5:10 am EST

    Hi Maksym,

    It seems that you have shared the sample data file instead of the report file. Can you please also share the report file so we can render the report with the sample data you have shared and see what is causing this issue?

  • Posted 13 June 2023, 8:08 am EST

    Yes exactly. I am also attaching the template.

    template.rdlx-json.zip

  • Posted 13 June 2023, 5:08 pm EST

    Hi Maksym,

    This issue is occurring as the font is unavailable to the report in the browser so a fallback font is used causing this behavior. You may configure fonts in ActiveReports by referring to the following page of our documentation: Fonts Configuration.

    For reference, I have also attached a sample application where I am using a custom font ‘Kerambit’ and configured using Core.FontStore in the application so the browser is now able to fetch the font and use it in the report.

    Regards,

    Akshay

    fontconfig.zip

  • Posted 13 June 2023, 5:39 pm EST - Updated 13 June 2023, 5:44 pm EST

    I added all required fonts. And as I wrote above, if I remove the sans-serif and leave only Verdana, then everything is fine. I think you can also check this by simply removing the sans-serif.

    I assure you that the Verdana font is drawn correctly. And it is applied correctly to other blocks.

  • Posted 14 June 2023, 9:38 pm EST

    Hi Maksym,

    I wasn’t able to reproduce this behavior at my end using the sample report. As a workaround, I would suggest you to add padding to the RichTextBox control.

    If the workaround doesn’t work for you then please share a sample application reproducing the issue and the steps to reproduce so we can replicate this behavior at our end and get back to you accordingly.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels