[RDLC] Right alignment of texts

This is probably one of those things all experienced RDLC report developers know since day one. But since I couldn't find it when "googleing" or "binging", it is still something that can make your live a bit easier.

When right-aligning a text on a report, (i.e. a header for a decimal column) you may have noticed that when using just the label that NAV provides through your dataset as value, the words in a tekst are not properly quite aligned.

The value of your control could be:

=First(Fields!AmountCaption.Value)

With this as a result:

This of course is because there is still al space in the text and the report puts that before the line break.

When simply adding a little code to you value expression:

=Replace(First(Fields!AmountCaption.Value)," ",chr(10))

This will be the result:

This code can also be found in several standard NAV reports, you just need to know where to look for it.

Comment List
Anonymous
Parents
No Data
Comment Children
No Data
Related
Recommended