Recently someone asked me how to print barcodes in a Dynamics NAV RDLC report. And I hade done something similar, years ago in NAV2009. So I had a look at my code and updated it to NAV 2015.
As you can see, it still works:
Usually a barcode is no more then a font you need to select, and maybe first download and install. But sometimes it does not work of is not available for all fonts. When I was confronted with this years ago, I went to mibuso.com (ofcourse) and found a good solution from Stijn Bossuyt, who used the code from Igor Pchelnikov: http://mibuso.com/downloads/interleaved-2-of-5-barcode-creator
Based upon that information I then created the report.
The source code is available here:
So I thought, why not share this?
Thanks to:
- Stijn Bossuyt:
Blog: http://mibuso.com/blogs/lyot - Igor Pchelnikov:
For the following post on Mibuso: http://mibuso.com/dlinfo.asp?FileID=1185 - For the details about barcoding:
http://www.barcodeisland.com - Description of the BMP file format:
http://en.wikipedia.org/wiki/BMP_file_format
PS:
There’s however a much better way to achieve the same goal. You can use a free web service to generate your barcodes, and .NET interop to manage it. Please have a look here:
Thanks Arend-Jan for this great tip!
Discover more from think about IT
Subscribe to get the latest posts sent to your email.
Pingback: How Do I: Print Barcodes in RDLC? - Microsoft Dynamics NAV Community
Pingback: How Do I: Print Barcodes in RDLC? - think about IT - Dynamics User Group
Pingback: How Do I: Print Barcodes in RDLC? | Pardaan.com
I prefer this method better than the web service, as the web service can be down at any moment, or the customer might have NAV behind a firewall.
Let me add a reference to this link, in case you need to put barcodes in report headers, you will to combine it with “getdata” and “setdata” report embeded functions:
http://www.seccount.com/en/developers-blog/nav-development/pass-picture-using-setdata
Thanks! It works like a charm and the code is easy to understand 🙂