|
|
|
|
|
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.
1. Define some Global variables as shown below:
| Name |
DataType |
Subtype |
Length |
| PDFCode |
Automation 'cruflBCS 1.0 Type Library'.CBCSPDF417 |
|
|
| DataMatrixCode |
Automation 'cruflBCS 1.0 Type Library'.CBCSDataMatrix |
|
|
| QRCodeCode |
Automation 'cruflBCS 1.0 Type Library'.CBCSQRCode |
|
|
| AztecCode |
Automation 'cruflBCS 1.0 Type Library'.CBCSAztec |
|
|
| MaxiCodes |
Automation 'cruflBCS 1.0 Type Library'.CBCSMaxiCode |
|
|
| GS1DatabarCode |
Automation 'cruflBCS 1.0 Type Library'.CBCSDatabar |
|
|
| LinearCode |
Automation 'cruflBCS 1.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.
|
|
|