How can I sum up "Amount (LCY)" from Cust Ledg Entry table by code programming?

Dear all,

I have a question as I put in the subject.

Could you please help me?

Right now, I try to create a report which contains data of “Customer No.”, “Customer Name”, " Amount (LCY)" and “Credit Limit (LCY)”.

Q1. How can I sum up “Amount (LCY)” from Cust. Ledg Entry table by code programming?

I want to show “Amount (LCY)” as Net balance not like Gross.(I need to make “Amount (LCY)” as just 1 line.)

Q2. How can I show the calculated balance From Q1 in Customer section body?

Regards,

Kz