I have a report which is creates a barcode from the Item Ledger fields, Item No + Variant Code. It's printed from a page which uses the Item Ledger table. When you select a record from the page you wish to print and press the print button, the report is finding the wrong record.

*Page to print from.
As you can see the entry No for the record Selected is 228472.
On the Item Ledger Entry table for the Item No it's finding the first record and using that, not the record you select from the Print page

How Can I change the code below to stop this and make it select the correct record.
my assumption is to setrange on the entry Number but my efforts have failed. And there are some FIND FIRSTS should these be changed to find sets?
recInvtSetup.FINDFIRST;
CLEAR(gstrItemVariant);
gstrItemVariant := "Item Ledger Entry"."Item No.";
"Item Variant".RESET;
"Item Variant".SETRANGE("Item No.", "Item Ledger Entry"."Item No.");
"Item Variant".SETRANGE(Code, "Item Ledger Entry"."Variant Code");
IF "Item Variant".FINDFIRST THEN BEGIN
Manufacturer := "Item Variant".Manufacturer;
"Manufacturer Part No." := "Item Variant".ManufacturerPN;
END ELSE BEGIN
Manufacturer := '';
"Manufacturer Part No." := '';
END;
"Item Ledger Entry".RESET;
"Item Ledger Entry".SETRANGE("Entry No.", "Item Ledger Entry"."Entry No.");
"Item Ledger Entry".GET("Item Ledger Entry"."Entry No.");
IF "Item Ledger Entry"."Variant Code" <> '' THEN BEGIN
LotNo :=
"Item Ledger Entry"."Item No."+
' - ' +
"Item Ledger Entry"."Variant Code";
EncodedBarCode :=
cuCPUtils.EncodeBarcode128(
"Item Ledger Entry"."Item No."+
'|' +
"Item Ledger Entry"."Variant Code"
);
END ELSE BEGIN
LotNo := "Item Ledger Entry"."Item No.";
EncodedBarCode :=
cuCPUtils.EncodeBarcode128(
"Item Ledger Entry"."Item No."
)
END;