Hello, I'm creating a report that displays all items and associated information for each. One field I must display is the Cross Reference Number for customer "X" which is stored in the Item Cross Reference table. How can I code for this? Here is what I tried, but the report comes back blank in this column for all records:
Xref.SETCURRENTKEY("Item No.","Variant Code","Unit of Measure", "Cross-Reference Type No.");
Xref.SETFILTER("Cross-Reference Type No.", 'C00010');
Xref.SETFILTER("Item No.",Item."No.");
Xref.SETFILTER("Variant Code",' ');
Xref.SETFILTER("Unit of Measure", 'EA');
XNo := Xref."Cross-Reference No.";
0
Comments
Xref.SETFILTER("Cross-Reference Type No.", 'C00010');
Xref.SETFILTER("Item No.",Item."No.");
Xref.SETFILTER("Variant Code",' ');
Xref.SETFILTER("Unit of Measure", 'EA');
IF Xref.FINDFIRST THEN
XNo := Xref."Cross-Reference No.";[/b]
ERP Consultant (not just Navision) & Navision challenger
-Don't use SETFILTER if you can avoid it. Better use SETRANGE. On the Navision DB it can be faster then a SETFILTER, but never slower. It is more readable because the SETRANGE has a clearer syntax for filtering on 1 value or a range of values.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!