Imprimer Code à barres en MS Dynamics NAV
support
Dynamics NAV bar code software download

Integrate barcode with MS Dynamics NAV


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 font-based software is a smart and simple solution for integration with Dynamics NAV.

First of all, please register the DLL with DOS command

regsvr32 cruflbcs.dll

If you are using 64-bit Windows 7 or Windows Vista, please open DOS prompt as administrator.

%systemroot%\System32\regsvr32 cruflbcs_x64.dll

If you are unable to create automation object on a Dynamics Nav server, please use the following solution
create(name-of-object, false, true)



1. Define some Global variables as shown below:



Name DataType Subtype Length
PDFCode Automation 'cruflBCS 4.0 Type Library'.CPDF417
DataMatrixCode Automation 'cruflBCS 4.0 Type Library'.CDatamatrix
QRCodeCode Automation 'cruflBCS 4.0 Type Library'.CQRCode
AztecCode Automation 'cruflBCS 4.0 Type Library'.CAztec
MaxiCodes Automation 'cruflBCS 4.0 Type Library'.CMaxicode
GS1DatabarCode Automation 'cruflBCS 4.0 Type Library'.CDatabar
LinearCode Automation 'cruflBCS 4.0 Type Library'.CLinear
_PDF Text 1024
_DataMatrix Text 1024
_Qrcode Text 1024
_AZTEC Text 1024
_MAXICODE Text 1024
_GS1Databar Text 1024
_LINEAR Text 1024
_text Text 1024


2. For PDF417 Barcode in Dynamics NAV



Don't forget to use font typeface BcsPdf417 to returned string.

Code

IF ISCLEAR(PDFCode) THEN BEGIN
CREATE(PDFCode);
END;
_text := ‘pdf417 to encode‘;
_PDF := PDFCode.Encode(_text);


Section:

element TextBox with properties

HorzAlign General
FontName BcsPDF417
MultiLine Yes
SourceExpr _PDF




3. For Data Matrix Barcode in Dynamics NAV



Don't forget to use font typeface BcsDatamatrix to returned string.

Code

IF ISCLEAR(DataMatrixCode) THEN BEGIN
CREATE(DataMatrixCode);
END;
_text := ‘datamatrix to encode‘;
_DataMatrix := DataMatrixCode.Encode(_text);


Section:

element TextBox with properties

HorzAlign General
FontName BcsDataMatrix
MultiLine Yes
SourceExpr _DataMatrix




3. For QRCode Barcode in Dynamics NAV



Don't forget to use font typeface BcsQrcode to returned string.

Code

IF ISCLEAR(QrcodeCode) THEN BEGIN
CREATE(QrcodeCode);
END;
_text := ‘qrcode to encode‘;
_Qrcode := QrcodeCode.Encode(_text);


Section:

element TextBox with properties

HorzAlign General
FontName BcsQrcode
MultiLine Yes
SourceExpr _Qrcode




4. For MaxiCode Barcode in Dynamics NAV



Don't forget to use font typeface Bcsmaxicode to returned string.

Code

IF ISCLEAR(MaxiCodes) THEN BEGIN
CREATE(MaxiCodes);
END;
_text := 'maxicode to encode';
_MaxiCodes:= MaxiCodes.EncodeCR(_text, 0, 3); //Please notice that 3 is mode.


Section:

element TextBox with properties

HorzAlign General
FontName Bcsmaxicode
MultiLine Yes
SourceExpr _Maxicodes




5. For GS1-Databar Barcode in Dynamics NAV



Don't forget to use font typeface Bcsdatabarm to returned string.

Code

IF ISCLEAR(GS1DatabarCode) THEN BEGIN
CREATE(GS1DatabarCode);
END;
_text := 'databar to encode';
_GS1Databar:= GS1DatabarCode.Databar14(_text);


Section:

element TextBox with properties

HorzAlign General
FontName Bcsdatabarm
MultiLine No
SourceExpr _GS1Databar




6. For Code128 Barcode in Dynamics NAV



Don't forget to use font typeface Code128aMHr to returned string.

Code

IF ISCLEAR(LinearCode) THEN BEGIN
CREATE(LinearCode);
END;
_text := ‘Text to encode‘;
_LINEAR := LinearCode.Code128A(_text);


Section:

element TextBox with properties

HorzAlign General
FontName Code128AmHr
MultiLine No
SourceExpr _LINEAR




7. For GS1-128 Barcode in Dynamics NAV



Don't forget to use font typeface Code128m to returned string.

Code

IF ISCLEAR(LinearCode) THEN BEGIN
CREATE(LinearCode);
END;
_text := ‘Text to encode‘;
_LINEAR := LinearCode.UCCEAN128(_text);


Section:

element TextBox with properties

HorzAlign General
FontName Code128m
MultiLine No
SourceExpr _LINEAR




8. For Intelligent Mail Barcode in Dynamics NAV



Don't forget to use font typeface BcsIM to returned string.

Code

IF ISCLEAR(LinearCode) THEN BEGIN
CREATE(LinearCode);
END;
_text := ‘Intelligent Mail barcode to encode‘;
_LINEAR := LinearCode.IM(_text);


Section:

element TextBox with properties

HorzAlign General
FontName BcsIM
MultiLine No
SourceExpr _LINEAR




You can generate all linear and 2D barcodes in Dynamics NAV.
Here is a list of all supported bar code symbologies and suggested bar code fonts.

Symbology Font Typeface used in NAV
Code39 accepts one string parameter Code39mHr
USS Code39 Code39mHr
Code39 Mod 43 Code39mHr
Code39 Extended ExtCode39mHr
Code11 Code11mHr
Code25 Code25mHr
Code25 with check digit Code25mHr
Interleaved 2of5 I25mHr
Interleaved 2of5 with check digit I25mHr
MSI / Plessey MSImHr
Code93 Code93mHr
Codabar CodabarmHr
Telepen TelepenMHr
Telepen Numeric TelepenNmHr
UPC-A UpcEanM
UPC-E UpcEanM
EAN-13 UpcEanM
EAN-8 UpcEanM
ISBN or Bookland UpcEanM
Royal Mail bcsRM4SCC
POSTNET Postnet
Intelligent Mail BcsIM
Code128A Code128aMHr
Code128B Code128bMHr
Code128C Code128cMHr
GS1-128 (UCC/EAN-128) Code128M
USS-128 Code128M
Master Carton Code, accepts only one parameter Code128M
PDF417, accepts 7 parameters. Index is used to deal with 255 character string length limitation. BcsPDF417
Data Matrix accepts 3 parameters BcsDataMatrix
QR Code accepts 3 parameters BcsQrcode
Code16K accetps 2 parameters Code16kMhr
Aztec accepts 4 parameters BcsAztec