hello,
I have multiple records with the same product code and different price values. I am looking to sum the price values and group by product
Break by doesn't seem to work for what i am looking for.
Example.
FH 1.00
FH 3.00
EP 5.00
EP 2.00
should return.
FH 4.00
EP 7.00
Code I have now.
FOR EACH rpm.coitem NO-LOCK
WHERE (rpm.coitem.stat = "F" AND rpm.coitem.ship-date > 01/01/2009 AND rpm.coitem.ship-date < 02/06/2009),EACH rpm.item NO-LOCK
OF rpm.coitem
BREAK BY rpm.item.product-code:
v_row = v_row + 1.
hWorkSheet:Cells(v_row, 1):VALUE = rpm.item.product-code.
hWorkSheet:Cells(v_row, 2):VALUE = rpm.coitem.price * rpm.coitem.qty-shipped.
thanks ahead time
I have multiple records with the same product code and different price values. I am looking to sum the price values and group by product
Break by doesn't seem to work for what i am looking for.
Example.
FH 1.00
FH 3.00
EP 5.00
EP 2.00
should return.
FH 4.00
EP 7.00
Code I have now.
FOR EACH rpm.coitem NO-LOCK
WHERE (rpm.coitem.stat = "F" AND rpm.coitem.ship-date > 01/01/2009 AND rpm.coitem.ship-date < 02/06/2009),EACH rpm.item NO-LOCK
OF rpm.coitem
BREAK BY rpm.item.product-code:
v_row = v_row + 1.
hWorkSheet:Cells(v_row, 1):VALUE = rpm.item.product-code.
hWorkSheet:Cells(v_row, 2):VALUE = rpm.coitem.price * rpm.coitem.qty-shipped.
thanks ahead time