If we use a text block and we enter some text and on the next line start with a field from the datasource, the resulting report shows a space in front of that field, which messes up the alignment. We save the .mrt and then a .cs file to use from our project.
For example:
Some header
{myData.SomeFieldName}
Where myData.SomeFieldName equals "TEST" (without the quotes, but just to make clear there are no spaces surrounding the text)
Result in:
Some header
TEST
Notice the space in front of TEST.
Very sporadically this does not happen and I have found the cause. If you look at the .mrt file. Then I see the following:
When it goes wrong: _x005C_par_x000D__x000A__x007B_myData.SomeFieldName_x007D_
When it goes right: _x005C_par_x000D__x000A__x005C_f0_x007B_myData.SomeFieldName_x007D_
So sometimes it added _x005C_f0 and the extra space does not occur, but most of the times it is ommited and we get an extra space in the resulting report.
I can manually add the _x005C_f0 to the .mrt when this happens, but when the report is saved through the editor it might or might not remove it again, so I would like this fixed.
Unwanted extra space in front of field in text block
-
Lech Kulikowski
- Posts: 7762
- Joined: Tue Mar 20, 2018 5:34 am
Re: Unwanted extra space in front of field in text block
Hello,
Please send us a sample report that reproduces the issue for analysis.
Thank you.
Please send us a sample report that reproduces the issue for analysis.
Thank you.
Re: Unwanted extra space in front of field in text block
See the attached report and the png to show the problem from the resulting output.
- Attachments
-
- result.png (2.98 KiB) Viewed 1556 times
-
- Report.mrt
- (6.74 KiB) Downloaded 29 times
-
Lech Kulikowski
- Posts: 7762
- Joined: Tue Mar 20, 2018 5:34 am
Re: Unwanted extra space in front of field in text block
Hello,
This is a feature of the RichText component behavior when different text fragments are combined.
We cannot know in advance what will be there, so we add a space to isolate words and commands.
A possible solution is to set FullConvertExpression=true for the component. In this case, a different merge algorithm will be used and this issue will not occur.
Thank you.
This is a feature of the RichText component behavior when different text fragments are combined.
We cannot know in advance what will be there, so we add a space to isolate words and commands.
A possible solution is to set FullConvertExpression=true for the component. In this case, a different merge algorithm will be used and this issue will not occur.
Thank you.