You just need to use a monospaced font to show it right aligned. It is right aligned when you use TRANSFORM(XY, "@Z 99,99,999.99"), no computer and no software and no programming language or cntrol will show it right aligned with a proportional font, though. just think about how that should work out. Even if there would be a way to have the rendering of a proportional font be anchored at the right side of a rectangle, the digits can only align perfectly with a monospaced font. Always and only. Every time you see some numbers right aligned it's not only because of being displayed right justified, but it is because people use a monospaced font for that, too.
To show you why you never get to the correct right justified formatting with a proportional font, take a look at extreme slim (1) and wide (0) digits in a proportional font:
What this shows is the scenario the right justification isn't made by spaces from the left but really by rendering with the text anchored to the right border.
What TRANSFORM does is put enough spaces as the prefix. But displayed in a proportional font the space character is slimmer than a digit, just like here the 1 digit is slimmer than the 0 digit, so the numbers are not shifted the right amount to the right. Even in proportional fonts, which have all digits in the same width, the space character typically is slimmer.
Use Courier New, that's quite the standard font for monospaced or non-proportional fonts.
Bye, Olaf.
Olaf Doschke Software Engineering