Decimal Align Column
Is there an easy way to decimal align a column?
I have a column of numbers that have a variable number of decimal places. How can I get their decimals all to align.
12.1
132.22
12.234
11.8
888.1
I am using Arial 10pt font and padding with spaces is not working to line up.
I have a column of numbers that have a variable number of decimal places. How can I get their decimals all to align.
12.1
132.22
12.234
11.8
888.1
I am using Arial 10pt font and padding with spaces is not working to line up.
Comments
I was afraid of that. It is such a basic function to most reports. But such a pain to have to code for each instance.
I think various options of memo view -> display format will help you.
e.g. : To show right aligned numbers, use hAlign 'Right', display format category 'Number' and format '%3.3f'
It will display result as -
12.100
132.220
12.234
11.800
888.100
My issue is that I have numbers that have varying decimal places based on the category of the test data. And I am trying to use the Arial font so that all numbers have the same look. I am setting the format text in the before print event. I cannot have trailing zeros beyond the expected accuracy of the original data. In I have not found a way to pad it accurately as the zero character is not the same width as a space. See my example data above and the attached image of how OpenOffice Writer handles a decimal tabstop.
There are several fonts which you can use.
my suggestion is courier new font. other fonts are sans serif, draft and roman fonts.