Hello, I'm trying to create a report that will display the following:
For all items for a given customer in the item cross reference, display detail for all posted purchase orders (for that item) where the Vendor Order No. in the Purch. Inv. Header is equal to "TTB".
My first data item is "Item Cross Reference", my nested data item is "Purch. Inv. Line". I'm able to display detail lines for ALL posted purchase orders- however, I cannot figure out how to limit those detail lines to only those where the associated Purch. Inv. Header record has "TTB" in the "vendor order no." field. Please help!
should "Purch Inv. Header" be another nested data item and filter somehow on Vendor Order No? Or should I do it through variables and code? I tried the following code but it doesnt seem to work:
PurchInvHeaderTable.SETCURRENTKEY("Vendor Order No.", "No.");
PurchInvHeaderTable.SETRANGE("No.", PurchInvLineTable."Document No.");
PurchInvHeaderTable.SETRANGE("Vendor Order No.", 'TTB');
IF PurchInvHeaderTable.FINDFIRST THEN
RecQty := PurchInvLineTable.Quantity
ELSE BEGIN
RecQty := 0;
END;
0
Comments
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
You define PurchInvHdr as a Variable of DataType Record Purch. Inv. Header
You could also define your search string as a variable to make it more flexible i.e instead of hardcoding TTB use MyString which could be filled in on the Options tab of the report
Hope this helps
Albert