#397 - Incorrect Handle number's format in merged report - not respect fields type and precision
hi Bugs with formating decimal (at least) - for example my decimal field has 10.0 precision, but in .docx's report it shows as the ONLY regional number formatting from locale config - # ###,## (and impossible to format in template as it passing as string with spaces) - have had to create custom function in core code to handle this case. Would be nice to fix it and add the same solutions you added for LongDate
10 years ago
You are right. Numbers are formated using $locale->getPrecision() number of decimals. If you need especial formatting for certain variable, you can create new calculated field to format field as your need ... but you are true, would be nice to add a format function (like f_LongDate for dates) to get numbers formatted as we need, without creating calculated fields every time. Variables using format functions are created in template like [a.date;onformat=~f_LongDate]
We will study this case and add solution in next version.
10 years ago
In next version we will add new format function for number of decimals. Example [a.numvar;onformat=~f_Decimals(1)]
Please, note that currently we cant add more significative decimals to formated number with this function than $locale->getPrecision(), and this function will fill with zero the rest