I created a virtual table ABC01V with SOP_HDR_WORK and a custom table XYZ01 with the relationship being SOP_HDR_WORK.SOPTYPE = XYZ01.SOPTYPE and SOP_HDR_WORK.SOPNUMBE = XYZ01.SOPNUMBE. XYZ01 has multiple records per SOPNUMBE. I created a RW report with the main table as the virtual table ABC01V. I set some sort options and there are no restrictions on the report definition.
Now I'm trying to run the report from Dexterity and only display the records for the SOPNUMBE that I'm working on.
If I do this, I get all the records in the table:
run report 'SOP PPM SN WORK Report' destination true, false;
If I try this (data table) I get an INTERNAL R-TREE error:
run report 'SOP PPM SN WORK Report' with restriction (('SOP Number' of table XYZ01 = '(L) SOP Number' of window 'SOP SerialNumber') and ('SOP Type' of table XYZ01 = '(L) SOP Type' of window 'SOP SerialNumber')) destination true, false;
If I try this (virtual table), I do not get any records:
run report 'SOP PPM SN WORK Report' with restriction (('SOP Number' of table ABC01V = '(L) SOP Number' of window 'SOP SerialNumber') and ('SOP Type' of table ABC01V = '(L) SOP Type' of window 'SOP SerialNumber')) destination true, false;
Every example I can find seems to use constants for the restrictions and all the reports seem to use temp tables.
What is the best way to filter the data?
*This post is locked for comments