Code:
TABLESUM ("ITEMS_INVCD.DBF" , "LI_INV_NO = "+QUOTE(LI_INV_NO) ,
"INVC_TOT") = 100000.20
Would yield a logical T/F result.... Is the result of the tablesum() = 100000.20?
The set name is "INVOICING" with the parent table named "INVC_HDR" and a child table named "ITEMS_INVCD"
The linking field is "
INV_NO" The child index is "
LI_INV_NO"
A numeric field in the parent table is "INVC_TOT"
A CALCULATED numeric field {QTY*PRICE} in the child table is "
ITEM_EXTENS"
TABLESUM ("ITEMS_INVCD.DBF" , "LI_INV_NO = "+QUOTE(LI_INV_NO) ,
"INVC_TOT")
I think you want
Code:
TABLESUM ("ITEMS_INVCD.DBF" , "LI_INV_NO = "+QUOTE(INV_NO) ,
"ITEM_EXTENS")
Sum the values in the ITEM_EXTENS field in the ITEMS_INVCD.DBF where the value in the LI_INV_NO field in the ITEMS_INVCD.DBF matches the value in the INV_NO in the INVC_HDR table.
I WROTE THE FOLLOWING EXPRESSION IN THE CALCULATED FIELDS BOX; IS THERE SOME OTHER PLACE TO WRITE THIS CODE? AS SOON AS I CLICK ON ok, AND RE-OPEN THE XY CALCULATED FIELDS BOX, THE EXPRESSION I JUST WROTE IS NOT THERE??? ANYWAY, THIS IS THE EXPRESSION...
Not sure what you mean. You need to define the INVC_TOT as calculated in the parent table field rules and give it the expression
Code:
TABLESUM ("ITEMS_INVCD.DBF" , "LI_INV_NO = "+QUOTE(INV_NO) ,
"ITEM_EXTENS")
Bookmarks