microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
784 stars 620 forks source link

[Bug]: Wrong Vendor's/ Customer's data while generating Vendor/Customer Top List report with Dimension filter. #26631

Open arvindbinarystream opened 4 months ago

arvindbinarystream commented 4 months ago

Describe the issue

When top vendor or top customer list excel reports are run with Dimension filter, report data are incorrect in excel file. AmountLCY field has correct calculated value with filter applied. Amount2LCY is always same whether the dimension filter is applied or not. That's an incorrect behaviour.

Expected behavior

When these reports run with dimension filters, it should calculate correct value for both Amount fields.

Steps to reproduce

On Business Central , search Top Vendor List or Top Customer List. On request page, Add Dimension filter in Filter Total by: section. Select values on which transactions must be filtered. Download report. image

In downloaded excel file, check TopVendorData sheet data. AmountLCY is different if Dimension Filter has value or it's empty. But for Amount2LCY, it's always same even if Dimension Filter has value. image

Additional context

This issue happens as in code business central is clearing dataitem which has filters applied and used to calculate amount fields. AmountLCY field is calculated with dimension filter and then dataitem gets cleared. When it comes to calculation of Amount2LCY field there are no filters.

For Top Vendor List, image

For Top Customer List, image

There's another question I have. Is Microsoft planning to add Dimension Data on these reports (Vendor/Customer list) as we have on Trial balance report? image

I will provide a fix for a bug

JesperSchulz commented 4 months ago

Sounds fair, but since the code you are referring to is in the BaseApp, you'd have to suggest and fix this code in the BaseApp contribution pilot: https://github.com/microsoft/businesscentralapps. For access to the pilot, please fill out the following form: https://forms.office.com/r/E9wyE5a58f.

This repository is only for extensibility requests or pull requests towards the 1st party Business Central apps.

Would you like me to move the issue to the contribution pilot for you?

IMPORTANT: Microsoft is not going to address the reported issue for you. You will have to get the issue approved, and then push a pull request with the suggested changes yourself. If you would like Microsoft to address the issue, please create a support request.

arvindbinarystream commented 4 months ago

@JesperSchulz I think the code I am referring to is in current repository. https://github.com/microsoft/ALAppExtensions/blob/main/Apps/W1/ExcelReports/app/src/Vendor/EXRVendorTopList.Report.al https://github.com/microsoft/ALAppExtensions/blob/main/Apps/W1/ExcelReports/app/src/Customer/EXRCustomerTopList.Report.al

Also, do you have any update on this question? image

arvindbinarystream commented 2 months ago

Hello @JesperSchulz, could you please address the issue I raised?

JesperSchulz commented 1 month ago

@AndreiPanko, could you triage this issue please and look at @arvindbinarystream's question?