procedure MakeCode128Barcode(Input: Code[20]): Text
var
BarcodeFontProvider: Interface "Barcode Font Provider";
BarcodeSymbology: Enum "Barcode Symbology";
EncodedText: Text;
begin
// Initialize the barcode provider
BarcodeFontProvider := Enum::"Barcode Font Provider"::IDAutomation1D;
// Set the barcode symbology to Code128
BarcodeSymbology := Enum::"Barcode Symbology"::Code128;
// Validate the input string
BarcodeFontProvider.ValidateInput(Input, BarcodeSymbology);
// Encode the input string to barcode font
EncodedText := BarcodeFontProvider.EncodeFont(Input, BarcodeSymbology);
//Set the field in your report to one of these fonts
//fonts do not have to be installed on your local computer if using saas
//Check codes here https://www.idautomation.com/barcode-fonts/code-128/user-manual/
//Type this directly into the font for the field, do not use the dropdown
// IDAutomationC128S
// IDAutomationHbC128M
exit(EncodedText);
end;
procedure Make3of9Barcode(Input: Code[20]): Text
var
BarcodeFontProvider: Interface "Barcode Font Provider";
BarcodeSymbology: Enum "Barcode Symbology";
EncodedText: Text;
begin
// Initialize the barcode provider
BarcodeFontProvider := Enum::"Barcode Font Provider"::IDAutomation1D;
// Set the barcode symbology to Code128
BarcodeSymbology := Enum::"Barcode Symbology"::Code39;
// Validate the input string
BarcodeFontProvider.ValidateInput(Input, BarcodeSymbology);
// Encode the input string to barcode font
EncodedText := BarcodeFontProvider.EncodeFont(Input, BarcodeSymbology);
//Set the field in your report to one of these fonts
//fonts do not have to be installed on your local computer if using saas
//Check codes here https://www.idautomation.com/barcode-fonts/code-128/user-manual/
//Type this directly into the font for the field, do not use the dropdown
// IDAutomationHC39S
// IDAutomationHC39M
exit(EncodedText);
end;