Ok, I have a report that is set to TextAlign = Justify.
I have a text box in the report that is set to TextAlign = Left. The text in the text box wraps to a second line.
When I run the report, the text is Justified, not aligned left, as specified for the text box.
Is this a bug, or does the TextAlign at the report level over-ride the alignment set at the text box level?
I've included screenshots that demonstrate this.
9 Answers, 1 is accepted
We are also seeing a possibly related issue with font size. I have a report with the font size set to 8 pt Arial.
In the report, I have two text boxes. One is set to 8pt Arial, and the other is set to 10pt Arial. When I run the report, both text boxes are shown as 8pt Arial. In the attached screenshots, I've overlaid the two text boxes. In edit mode, you can clearly see that on is larger than the other. In Preview mode, both are the same size.
If I change the size of the 10pt text box to something larger, Preview mode shows the correct size. If I change the size back to 10 pt, Preview mode shows the text at 8pt.
Edit: I don't know if this issue has anything to do with the report font size. I changed it to 12pt, and with one text box at 8pt, and the other at 10pt, they both show as 8pt.
About text alignment, you can find attached a demo report created by the Standalone Report Designer of R1 2017 SP1 v188.8.131.52 where styles are applied based on Style Inheritance and Overriding.
The same layout was tested in Q1 2015 v184.108.40.2064 and works correctly.
Please test upgrading the reports to any of the suggested versions of Telerik Reporting.
On a side note, if you see the problem in web preview only, and the same is not reproducible in design-time and PDF previews, inspect the HTML rendered on the page and trace the style inheritance. Most probably there are external CSS messing with the HTML of the report.
Telerik by Progress
Your example is different than mine. Please remove the carriage return before the last word, then change the width of the text box so the last word is on the second line. Please see my attached screenshots. They clearly show that in Preview mode, the text is JUSTIFIED, even though the text box is set to LEFT justify.
The documentation you pointed to says the highest priority should be inline.
"Highest Priority - Inline: If the child control's Style properties have been changed from their defaults, then these properties will be honored with the highest priority. In this case, the the Global styling and the style of the parent will be ignored."
I'm thinking this means the styles applied to the text box have a higher priority than the styles applied to the parent object (in this case, the Detail section). Am I correct?
Also, we are using the Standalone Telerik Report Designer, and I am using the application's Preview mode to see this issue. We are NOT using web preview. I opened the .trdx file with Notepad++ and took a screenshot of that (hoping it might help you diagnose the issue). We are not using a browser to view out output.
You can find attached the modified report that is updated for Telerik Reporting R1 2017 and newer. The output of the TextBox is left aligned correctly.
The same result appears on preview by using Q1 2015 Report Designer. The design-time preview of both Report Designers uses Image rendering.
Telerik by Progress
I'm sorry, Stef, but when I open your report in Report Designer and Preview, the text is JUSTIFIED. It is NOT working correctly. Do you require proof other than the many screenshots I've posted?
I've, again, attached screenshots of YOUR report that I opened and previewed. Please help me to understand why it is left justified for you, but justified for me.
I attached a video illustrating the preview on my machine with Telerik Reporting v220.127.116.113 and its Standalone Report Designer. The video can be checked in IE browser.
In the video I added border around the TextBox item to show you the size is not changed on preview. Please check if you start the correct version of the Standalone Report Designer. Also check the machine's Display settings and used the default zoom 100%.
You can also test running the report on other machine and/or reinstall Telerik Reporting on your machine.
If it was not the report I provided, possible reasons are additional settings applied through the report's StyleSheet, via conditional formatting or the TextBox item's Bindings collection.
Telerik by Progress