Can somebody please help me to customize a invoice using report writer from Pastel MyBusiness.

I have customized what I want sofar but I am stuck at the Total Discount field. From what i can see in pastel the total discount only shows a figure if you add a total discount to an invoice, not the total per line.

I would like to show at the bottom of the invoice the total discount given, calculated from all the lines that actually have discount to them.

Is there somebody that can help me to add the data values or change the fields using report writer to do this?