# How to sum some lines (in details section) of system layout of SAP B1 in crystal report 2011?

Hello,

I would kindly like to ask how to do a formula in a system layout to do Sum of all invoices(IN) and Incoming Payment(RC) in Customer Aging Report for all Customers. here's a screenshot I took please find it.

I want to sum amount of all RC 1 and to sum all IN documents, How can I do that in Customer Aging Report?

Thanks

Looking forward to your great help.

Best Regards,

aging.png (23.5 kB)
10|10000 characters needed characters exceeded

Feb 11 at 02:52 PM

Hi Rurangwa,

1- In section "details d" create this formula SUM_ALL_INandRC1 and make it invisible:

```Shared numbervar total;
IF left({PLD__ITEMS.F_34},2) in ('IN';'RC 1')
then total:=total + If NumericText({@F_38}) then toNumber({@F_38}) else 0
```

2- In section "details g" create the second formula: Tot_IN_RC

```shared numbervar total;
```

Hope this helps you.

Aziz

solution.png (35.7 kB)
10|10000 characters needed characters exceeded
• Thank you so much Aziz,

You solved many different issues for me

• Feb 11 at 07:18 AM

Hi,

Right-click the Amount field > Insert Summary > Choose the summary location as "Grand Total (Report Footer)".

-Abhilash

10|10000 characters needed characters exceeded
• Feb 11 at 01:14 PM

Hi Abhilash,

I wanted to take total of IN or RC for all customers, if I use that summary it does but it separates customers with their lines.

Where all customers displayed to the first page and their lines displayed to next pages (order by F_34_Symbol asc).

If I sort in original order, it sums IN or RC per each customer, I want that to sum IN or RC of all customers

Is it possible to do that?

Thank you