Report Designer Error: An item with the same key has already been added

SOLVED

I'm trying to join "Stock Items" into the "SOP Invoice (Single).layout", as a few of our customers have requested their product codes to appear on the invoices we raise (currently stored as "Part Number" in the stock record).

Sage gives the option to link to the following:

SYSTaxRates

SYSCountryCodes

TraceableItems

TraceableTypes

I have connected to all and added the "PartNumber" field, but when I preview the report I get the error, "An item with the same key has already been added."

Any help would be appreciated.

Parents
  • +1
    verified answer

    Tom,

    You should only need to add two tables to your Invoice layout, SOPStandardItemLinks and StockItems.  The SOPStandardItemLinks should automatically link to the SOPStandardItemLines, but needs to be changed to a ParentOuter (LEFT OUTER JOIN) to ensure that ALL lines come through not just Stock Lines (Line Type 0).  Then add the StockItems table, but ignore the auto joins and create another ParentOuter between SOPStandardItemLinks.ItemID and StockItems.ItemID.

    This should then allow you to add Stock Item columns to the layout.

Reply
  • +1
    verified answer

    Tom,

    You should only need to add two tables to your Invoice layout, SOPStandardItemLinks and StockItems.  The SOPStandardItemLinks should automatically link to the SOPStandardItemLines, but needs to be changed to a ParentOuter (LEFT OUTER JOIN) to ensure that ALL lines come through not just Stock Lines (Line Type 0).  Then add the StockItems table, but ignore the auto joins and create another ParentOuter between SOPStandardItemLinks.ItemID and StockItems.ItemID.

    This should then allow you to add Stock Item columns to the layout.

Children
No Data