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;
}

Report
All responses (
Answers (