08-05-2021 22:07 PM - last edited 08-06-2021 01:32 AM
This is component library including Barcode generator.
At this time, it supports EAN/JAN and CODE-39 format
* Will update here when other format is available
Input properties
InputCode (Text type) : Barcode data
AutoCheckDigit (Boolean) : If true, add/replace auto-calculated digit.
I found a bug at the check digit calculation.
----------
(10-Right(Text(Sum(Sequence(6,2,2),Int(Mid(JAN_EAN.InputCode,ThisRecord.Value,1)))*3+Sum(Sequence(6,1,2),Int(Mid(JAN_EAN.InputCode,ThisRecord.Value,1)))),1))
----------
When this result is "10", the correct check digit is "0".
But the logic returns "10".
I fixed as the following.
----------
Mod((10-Right(Text(Sum(Sequence(6,2,2),Int(Mid(JAN_EAN.InputCode,ThisRecord.Value,1)))*3+Sum(Sequence(6,1,2),Int(Mid(JAN_EAN.InputCode,ThisRecord.Value,1)))),1)),10)
----------