Hey guys,
I have seen them but didn’t pay attention to them…
Now… I love them!
But please I need some help here.
I’m building a client statistics, getting data from 3 tables:
- Clients (main) ,
- Orders
- Payments
I successfully:
- created the basic query pulling all the clients data
- created a custom query pulling the total order’s amount (if there are any) of each client
- created a custom query pulling the total payment’s amount (if there are any) of each client
- Joined the main clients query with the orders query (qr_clientRecords_MainOrders)
- Joined the main clients query with the payments query (qr_clientRecords_MainPayments)
- Joined the above two queries (4 & 5)
Now, I can get all the records of clients that have order or/and payment.
Fine!!!
It would be great if I could add a column on my final query (6) to give me the balance
(total_orders - total_payments)
I just can’t understand how to assign the total_orders or total_payment to the new column (“balance”)
Set to:
-
total_payments -> gives me null
-
qr_clientRecords_OrdersPayments[0].total_payments gives me for all the records the value of the first record
-
qr_clientRecords_OrdersPayments[$index].total_payments -> gives me null
If anybody has an idea please