Try Microsoft Edge
A fast and secure browser that's designed for Windows 10
I want if Balance is < 0 then it should show Balance Amount + 'Dr'. If > 0 then Balance Amount + 'Cr' in report textfield
You can write this code on onaftergetrecord trigger
If balance >0 then
Balanceamount :=format (balance)+'dr'
Define balanceamount aa variable with datatype text
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
Use this text variable 'Result' in your report textfield.
You may use the methods mentioned by Amol and Tina
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 KulkarniPlease verify, if you find answer helpful.