SUM of 2 lines in a report

Good Afternoon,

Report of end of shift for the cashier/waiter: So he knows how much he has to give me in Cash and Credit Card.

Here is what I have:

I would like to SUM the 2 yellow numbers.

  • The first line was obtained with: REPORT PAYMENT TOTAL.
  • The second line was obtained with a REPORT SQL DETAILS statement.

Is there an easy way to “store” these values ($x ?) and then sum them?

the report syntax:

Fecha delreporte: {DATE}
Cajero: {SETTING:CURRENTUSER}
[Cierre de Caja:4, 1]
@ {SETTING:CURRENTUSER},
‘>>Efectivo
Venta|{REPORT PAYMENT TOTAL:(PT=Cash) AND (PU={SETTING:CURRENTUSER})}
{REPORT SQL DETAILS:
SELECT ‘Cash In/Cash Out’ as CashIN ,sum([Debit]+[Credit]*-1) as [txTotal]
FROM [AccountTransactionValues]
WHERE [Name] LIKE ‘%$1’+’%’ AND [AccountId]=5
:F.CashIN,F.txTotal
}

Or just add them as as a sum in a [=xxx] maybe with some TN()

Rerun both statements in the [=…] ?

Like [={REPORT PAYMENT TOTAL:…} + {REPORT SQL DETAILS:…]] ?

Thank you

Marc

Yer, you might need to wrap each in a TN() to sum correctly depending on how the values are returned.