I am extending a report from Warehouse Insight so I can use there barcode generator.
I can product a barcode using this method but I am having trouble getting additional fields from the Item table and linking them to the barcode text.
barcodeText := itemGTIN variable itemDesciption variable Format(itemWeight, 9) variable "Country/Region Code" variable "Lot No.";
reportextension 50202 "AM Item Barcode Label" extends "WHI Item Barcode Label" { RDLCLayout = 'AM Item Barcode Label.rdlc'; dataset { addfirst(diItemLedgerEntry) { dataitem(Item; Item) { DataItemLink = "No." = field("Item No."); DataItemTableView = sorting("No."); column(GTIN; GTIN) { } column(Gross_Weight; "Gross Weight") { } column(Description; Description) { } trigger OnPreDataItem() begin itemGTIN := GTIN; itemWeight := "Gross Weight"; itemDesciption := GTIN; end; } } add(diItemLedgerEntry) { column(barcodeImage; Barcode.Image) { } column(barcodeText; barcodeText) { } } modify(diItemLedgerEntry) { trigger OnAfterAfterGetRecord() var BarcodeGeneration: Codeunit "IWX Library - Barcode Gen"; variable: Text; begin variable[1] := 10; barcodeText := itemGTIN variable itemDesciption variable Format(itemWeight, 9) variable "Country/Region Code" variable "Lot No."; //Item.GTIN variable "Description" variable Format(Item."Gross Weight", 9) BarcodeGeneration.GenerateQRBarcode(Barcode, barcodeText, 220); end; } } var Barcode: Record "IWX Barcode" temporary; barcodeText: Text; itemGTIN: Text; itemWeight: Decimal; itemDesciption: Text; }
report 23044900 "WHI Item Barcode Label" { RDLCLayout = 'source/reports/WHI Item Barcode Label.rdlc'; Caption = 'Warehouse Insight Item Barcode Label'; dataset { dataitem(diItem; Item) { column(diItem_No_;'Code[20]') { } } dataitem(diItemLedgerEntry; "Item Ledger Entry") { } dataitem(diLabels; Integer) { dataitem(diNumCopies; Integer) { column(trecItems_No;'Code[20]') { } column(trecItems_Description;'Text') { } column(trecItems_Routing;'Code[50]') { } column(fldBarcode;'Blob') { } column(fldLotSerialBarcode;'Blob') { } column(diNumCopies_Number;'Integer') { } column(fldQuantity;'Decimal') { } column(fldUnitOfMeasure;'Code[10]') { } column(fldIncludeQty;'Boolean') { } column(fldExpiryDate;'Text') { } } } } requestpage { layout { area(content) { group(Options) { Caption = 'Options'; field(fldNumCopies; iNumCopies) { Caption = 'Number of Copies'; } field(fldIncludeQty; bIncludeQty) { Caption = 'Include Quantity'; } } } } } var trecItems: Record Item temporary; recWHISetup: Record "WHI Setup"; trecBarcode: Record "Company Information" temporary; trecLotSerialBarcode: Record "Company Information" temporary; cuWHICommon: codeunit "WHI Common Functions"; cuSessionHelper: codeunit "WHI Session Helper"; iNumCopies: Integer; iCount: Integer; bIncludeQty: Boolean; tcOnlyOneFilterErr: Label; dQuantity: Decimal; codUOM: Code[10]; codTrackingNumber: Code[50]; dtExpiryDate: Date; sExpiryDate: Text; }
Hello - We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.
I will open this up to the community in case they have something to add.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156