Al: Error with DecimalPlaces parameter on report columns of type decimal

Created on 15 May 2020  Â·  7Comments  Â·  Source: microsoft/AL

Describe the bug
DecimalPlaces property seems to be not taken into account when running reports. Only tested with report of type Docx.

Error only in BC16

To Reproduce
Create extension with decimal column and decimalplaces parameter.

Installed extension on BC15 and BC16 Sandboxes, see the error only occurs in BC16.

AL Code to reproduce the issue

Expected behavior
Expected to have 3 decimals always if decimalplaces property is set to "3 : 3"

Screenshots

5. Versions:

  • AL Language:
  • Business Central: Sandbox 16 and 16.1
bug in-progress

Most helpful comment

TestDecimals.Report.zip
I have attached an example of the problem, where there are three columns in the data set, one decimal place, two decimal place and three decimal place formatted in the decimalplaces property, however the format on the report for all three is 2 decimal places.

All 7 comments

What is the error? It sounds like you in fact don't get an error message, but rather that you get a non-rounded decimal showing in the docx. Is that correct?

A test on an RDL report would be good too.

That is correct

I have possibly the same issue. I have a decimal field that I have set the DecimalPlaces property to 2:3, In earlier versions (13/14/15) the DecimalFieldFormat.Value contains #,##0.00# now however the data set is getting #,##0.00 and so only 2 decimals are displayed for the decimal value on the report when it uses this as a custom format on the RDLC layout
I have used the current sandbox environment to test
Version: 16.1.12629.12805-au
Platform: 16.0.12630.12758

Can you please provide a project that reproduces the issue?

TestDecimals.Report.zip
I have attached an example of the problem, where there are three columns in the data set, one decimal place, two decimal place and three decimal place formatted in the decimalplaces property, however the format on the report for all three is 2 decimal places.

Thank you! That will help a lot in troubleshooting this.

The issue has been fixed and checked into the master branch. It will be available in the next developer preview and CU3 of the Wave 2 release.

Was this page helpful?
0 / 5 - 0 ratings