web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

SSRS Report calculation field issue

(0) ShareShare
ReportReport
Posted on by 406

Hello, i am having issues with calculation field on my sales invoice report. 

So what is actually happening is calculation in my report of many lines is different, what i mean is a line will have the calculation correct, while other line will be wrong.

pastedimage1684406326108v1.png

As u can see, in line 2, the taxable amount calculation is wrong. the calculation is (UnitPRICE*QTY)-LineDisc% - totalDisc%

but for line 3, if u apply this formula, the calculation is correct.

What i am mapping on the taxable amount field is the field SourceBaseAmountCur FROM taxTrans table, and my field name is Ex_TaxBaseCur which is the EDT of SourceBaseAmountCur, and my table is salesinvoicetmp.

here is my code on salesinvoicedp extension class:

select taxTrans where taxTrans.InventTransId == _custInvoiceTrans.InventTransId;
if(taxTrans)
{
salesInvoiceTmp.Ex_TaxBaseCur = abs(taxTrans.SourceBaseAmountCur); // abs is used to show positive values.
}

else
{

salesInvoiceTmp.Ex_TaxBaseCur = 0;
}
}

i have been stuck with this issue for long, because if my issue is with the code it would give wrong value for all lines not one line correct and other wrong, it doesnt make sense.

anyone can help?

I have the same question (0)
  • huijij Profile Picture
    19,811 on at
    RE: SSRS Report calculation field issue

    Hi MounirDev,

    I think the only way to find the problem is to debug it and then look carefully at the line that reports the error and compare the results of each step with your own calculations.

  • D365FO DEV Profile Picture
    406 on at
    RE: SSRS Report calculation field issue

    hi i did debug, but what i found is the taxable amount is only related to quantity 1 and not considering other quantities where also in line 2, the quantity is 3 and the calculation is based on quantity 1.

    also i opened table browser and when i filtered on the same id in taxtrans table, it had 2 records and the field related to taxable amount had also 2 amounts, one is correct and one incorrect.

  • D365FO DEV Profile Picture
    406 on at
    RE: SSRS Report calculation field issue

    Hi my issue is fixed. i was able to fix it by adding a condition to my code. thanks

    but i have another question, when i deployed the package to UAT, this report has a QR code. when i  try to print it on UAT , the QR is not showing, i think some configuration are missing. is that possible u can help me with this issue?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans