Unwanted extra space in front of field in text block
Posted: Tue May 05, 2026 1:19 pm
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.
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.