F
Frank Meulblok
Guest
Ah. spotted another gotcha. Data-source for the child table will already get an automatically generated FILL-WHERE-STRING based on the data-relations. And you'll want to append to that, not overwrite it. Quick sample using sports2000 database schema follows. This will fetch customers 1-4, all shipped orders for those, and nothing outside those specifications: define temp-table ttCustomer no-undo like customer . define temp-table ttOrder no-undo like order . define dataset dsCustOrd for ttCustomer,ttOrder data-relation relCustord for ttCUstomer,ttOrder relation-fields(custnum,custnum) nested. define data-source srcCustomer for Customer. define data-source srcOrder for Order. buffer ttCustomer:attach-data-source(data-source srcCustomer:handle). buffer ttOrder:attach-data-source(data-source srcOrder:handle). message data-source srcOrder:fill-where-string. data-source srcOrder:fill-where-string = data-source srcOrder:fill-where-string + " and orderstatus = 'shipped' ". message data-source srcOrder:fill-where-string. data-source srcCustomer:fill-where-string = "where custnum = 5). message can-find (first ttorder where ttorder.orderstatus <> "Shipped").
Continue reading...
Continue reading...