Dynamics Navision Barcode Integration using COM
IDAutomation recommends using SSRS for Dynamics barcode generation when possible. This integration guide was provided by a customer that used the COM object from the Data Matrix Font and Encoder to generate a 2D matrix barcode on a report in Dynamics Navision 2009 RTC. It can be used for other barcode types by changing the Automation DataType, Code, and Barcode Font appropriately. This option will only work in the RTC Client, it will not work in the Classic Client.
- Purchase the desired barcode font package and Install the appropriate COM product depending on the type of barcode that is needed. COM objects are automatically installed in all 2D font and encoder packages when running the setup EXE file.
Linear | Data Matrix | PDF417 | QR Code
- Create a new report and go to C/AL Globals.
- Add a variable ‘Datamatrix’ as an Automation DataType and select IDautomation Datamatrix Barcode 1.803.Datamatrix. Add another variable ‘Barcode’ as a Text DataType with a Length of 1000.
- Use the code below in the report section. in this case, ‘hi’ is the text to put in the 2D code which should be a variable instead for dynamic data. Barcode is the return value and will be used to display the 2D code. Note: the options 0,0,0 can be different depending on the parameters of the COM or ActiveX object:
Code 128: barcode=Code128(DataToEncode) ;
Data Matrix: FontEncode(DataToEncode,0,0,0,barcode);
QR Code: FontEncode (DataToEncode,0,0,0,0,0,barcode);
- Go to the Section Designer.
- Add a field on the report with the source: ‘Barcode’.
- Select the appropriate font, in this case, it is the Font IDautomation2D.
- Go to ‘Create Layout Suggestion’.
- Check the result in Visual Web Developer or Visual Studio.
- Save the report and start the report from the RTC Client and find the barcode on the report.
* IDAutomation fully supports the fonts and components provided by IDAutomation. IDAutomation provides guides about how customers have integrated barcodes into Dynamics, however, IDAutomation cannot assist with the integration into Dynamics. If this type of assistance is needed, contact Microsoft Dynamics Support.