Integrate barcode with MS Dynamics NAV
Keywords:
Microsoft Dynamics NAV, barcode, QR Code
Microsoft® Dynamics NAV®, formerly known as Navision, is a complete ERP (Enterprise Resource Planning) system for mid-size organizations.
If you want to generate linear or 2D barcode in Microsoft Dynamics NAV, you don't need to look any further.
Barcodesoft crUFLBcsNet.dll is a smart and simple solution for integration with Dynamics NAV.
Using crUFLBcsNet.dll in MS Dynamics NAV
To use crUFLBcsNet.dll in Microsoft Dynamics NAV:
-
Register
crUFLBcsNet.dll
Open DOS prompt as Administrator and run:
cd "C:\Program Files (x86)\Common Files\Barcodesoft\cruflbcsnet"
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm cruflbcsnet.dll /tlb:cruflbcsnet.tlb /codebase
-
Copy
crUFLBcsNet.dllinto the NAV add-ins folder
(recommended:C:\Program Files (x86)\Microsoft Dynamics NAV\...\RoleTailored Client\Add-ins\).
-
In the NAV development environment (C/AL), use automation to generate QRCode:
myQR := myQR.CQRCode; // This requires bcsqrcode.ttf font codewords := myQR.Encode('1234567890'); // Pure image, no font required barcodeBytes := myQR.Image('1234567890', 240, 240); // Save to file or stream into a BLOB BLOBField.CREATEINSTREAM(inStream); inStream.Write(barcodeBytes); // Artistic QR image, no font required barcodeBytes := myQR.AwesomeQR('1234567890', 'Tangerine', 'XS'); BLOBField.CREATEINSTREAM(inStream); inStream.Write(barcodeBytes); -
In the NAV development environment (C/AL), use automation to generate Data Matrix:
myDTM := myDTM.CDatamatrix; // This requires bcsdatamatrix.ttf font codewords := myDTM.Encode('1234567890'); // Pure image, no font required barcodeBytes := myDTM.Image('1234567890', 240, 240); BLOBField.CREATEINSTREAM(inStream); inStream.Write(barcodeBytes); -
In the NAV development environment (C/AL), use automation to generate PDF417:
myPDF417 := myPDF417.CDatamatrix; // This requires bcspdf417.ttf font codewords := myPDF417.Encode('1234567890'); // Pure image, no font required barcodeBytes := myPDF417.Image('1234567890', 240, 240); BLOBField.CREATEINSTREAM(inStream); inStream.Write(barcodeBytes); -
In the NAV development environment (C/AL), use automation to generate GS1128 barcode:
myLinear := myLinear.CLinear; // This requires UpcEanM font. Don't forget the parentheses and AI prefixes. codewords := myLinear.GS1128('(17)190508(90)50921'); // Pure image, no font required barcodeBytes := myLinear.GS1128Image('(17)190508(90)50921', 480, 240); // Save to file or stream into a BLOB BLOBField.CREATEINSTREAM(inStream); inStream.Write(barcodeBytes);
Additional TIps:
• Ensure the Barcodesoft font (e.g., bcsqrcode.ttf, bcsdatamatrix.ttf, UpcEanM.ttf) is installed on all client and report servers.
• The .NET Framework version used to register crUFLBcsNet.dll must match the version running NAV.
• You can automate barcode generation inside NAV reports, pages, or codeunits.
• All barcode classes support both string encoding and bitmap image generation methods.
• For cloud or containerized NAV environments, use the image methods instead of fonts to ensure platform independence.


