Hi
I want if Balance is < 0 then it should show Balance Amount + 'Dr'. If > 0 then Balance Amount + 'Cr' in report textfield
Thanks
*This post is locked for comments
Hi
I want if Balance is < 0 then it should show Balance Amount + 'Dr'. If > 0 then Balance Amount + 'Cr' in report textfield
Thanks
*This post is locked for comments
Yes, you may use the methods by Amol sir and Tina.
Or else you can directly provide the Expression of the Textbox as:
iif(Balance < 0,CStr(Balance)+"Dr",CStr(Balance)+"Cr")
-Yogesh Kulkarni
Please verify, if you find answer helpful.
Hi,
You may use the methods mentioned by Amol and Tina
Hi,
You can define a variable 'Result' with datatype 'Text' in C/AL globals. Now in OnAfterGetRecord trigger you can write the following code:
IF Balance <0 THEN
Result:=FORMAT(Balance)+' Dr'
ELSE
Result:=FORMAT(Balance)+' Cr';
Use this text variable 'Result' in your report textfield.
You can write this code on onaftergetrecord trigger
If balance >0 then
Balanceamount :=format (balance)+'dr'
Else
Balanceamount:=format(balance)+'cr'
Define balanceamount aa variable with datatype text
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156