CR 9.2
I am attempting to run a report that shows total commitment dollars per purchase order with total paid invoices and total unpaid invoices against each purchase order. The total po commitment is actually a sum of the individual line items that make up the po. I have a running total on the commitment value and am not having a problem with that column. My problem is attempting to get the correct invoice values for the paid and unpaid invoices recorded against each purchase order number. The table/columns involved are:
purchase order:
rp700.rp_id purchase order ID
rp700.comm_cost po line item commitment
invoices:
ap620.rp_id ap purchase order ID
ap_620.net_amt ap invoice net value
ap_620.status ap invoice paid or unpaid
What is correct syntax in the running total construct to get the correct running total for only PAID invoices for each purchase order? I've tried summing the net_amt and evaluating when the group rp_id changes and resetting when the rp_id changes, but this doesn't work when there are many invoices to the same po and it also won't give me only the paid or unpaid invoices...
Any help much appreciated...
Randy
I am attempting to run a report that shows total commitment dollars per purchase order with total paid invoices and total unpaid invoices against each purchase order. The total po commitment is actually a sum of the individual line items that make up the po. I have a running total on the commitment value and am not having a problem with that column. My problem is attempting to get the correct invoice values for the paid and unpaid invoices recorded against each purchase order number. The table/columns involved are:
purchase order:
rp700.rp_id purchase order ID
rp700.comm_cost po line item commitment
invoices:
ap620.rp_id ap purchase order ID
ap_620.net_amt ap invoice net value
ap_620.status ap invoice paid or unpaid
What is correct syntax in the running total construct to get the correct running total for only PAID invoices for each purchase order? I've tried summing the net_amt and evaluating when the group rp_id changes and resetting when the rp_id changes, but this doesn't work when there are many invoices to the same po and it also won't give me only the paid or unpaid invoices...
Any help much appreciated...
Randy