Adding a field from an outside table to a report

Hey all,

NAV 2013 R2

I’m editing a PO for a client and they would like to see a field from the Item table show up in the line items on the report.

The report in designer is setup with 1 dataItem as Purchase Header and another for the purchase lines.

Do I need to add a third table to the report loop logic to pull a field from the Item table

OR

Do I need to add the desired table to the Purchase Lines page pulling from the item card then add it to the report?

thanks,

Hi Rob,
No, you don’t need to add the Item table as a dataitem.
A way to do it would be to add an Item variable to the report, and from the Purchase Line data item get the report.

Example:

IF Type = Type::Item THEN // Unless you have a filter to the line item only showing Item
Item.GET(“No.”)
ELSE
Item.Init;

IF (Type = Type::Item) AND (“No.” <> ‘’) THEN // Unless you have a filter to the line item only showing Item

Item.GET(“No.”) //also consider what to do if the itemNo longer exists

ELSE

Item.Init;