.
report 50102 "Purchase Order Barcode"
{
ApplicationArea = All;
RDLCLayout = 'PurchaseOrder.rdlc';
UsageCategory = ReportsAndAnalysis;
dataset
{
// DataItem for Purchase Header
dataitem("Purchase Header"; "Purchase Header")
{
DataItemTableView = sorting("No.");
RequestFilterFields = "No.";
// Columns for Purchase Header
column(No_; "Purchase Header"."No.")
{
}
column(Vendor_Name; "Purchase Header"."Buy-from Vendor Name")
{
}
column(Status; "Purchase Header"."Status")
{
}
column(PurchaseheaderBarcode; "Purchase Header"."PurchaseheaderBarcode")
{
}
trigger OnAfterGetRecord()
var
barcodeGenerator: Codeunit "IWX Library - Barcode Gen";
barcodeDotSize: Integer;
barcode: Record "IWX Barcode" temporary;
begin
barcodeDotSize := 4;
barcodeGenerator.GenerateQRBarcode(barcode, "Purchase Header"."No.", barcodeDotSize);
"PurchaseheaderBarcode" := barcode.Image;
end;
}
// DataItem for Purchase Line nested under Purchase Header
dataitem("Purchase Line"; "Purchase Line")
{
DataItemLink = "Document No." = FIELD("No.");
DataItemTableView = sorting("Line No.");
// Columns for Purchase Line
column(Line_No; "Purchase Line"."Line No.")
{
}
column(Item_No; "Purchase Line"."No.")
{
}
column(Description; "Purchase Line"."Description")
{
}
column(Quantity; "Purchase Line"."Quantity")
{
}
column(Unit_Price; "Purchase Line"."Direct Unit Cost")
{
}
column(Line_Amount; "Purchase Line"."Line Amount")
{
}
column(PurchaseorderlineBarcode; "Purchase Line"."PurchaseorderlineBarcode")
{
}
trigger OnAfterGetRecord()
var
barcodeGenerator: Codeunit "IWX Library - Barcode Gen";
barcodeDotSize: Integer;
barcode: Record "IWX Barcode" temporary;
begin
barcodeDotSize := 4;
barcodeGenerator.GenerateQRBarcode(barcode, "Purchase Line"."No.", barcodeDotSize);
"PurchaseorderlineBarcode" := barcode.Image;
end;
}
}
}