Barcode 39 with checksum
?Hi All,
i ?ve a question. i want to make a barcode with a checksum. But i see
only a "normal" 39 barcode in the barcode properties.
And a other thing. i want to build 3 datas from the db to one barcode.
e.g.
Var1= xx
Var2= yy
Var3= zz
Barcode: xx/yy/zz
Can someone help me.
Thanks a lot!
Michael
--- posted by geoForum on http://delphi.newswhat.com
i ?ve a question. i want to make a barcode with a checksum. But i see
only a "normal" 39 barcode in the barcode properties.
And a other thing. i want to build 3 datas from the db to one barcode.
e.g.
Var1= xx
Var2= yy
Var3= zz
Barcode: xx/yy/zz
Can someone help me.
Thanks a lot!
Michael
--- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.
Comments
For future reference, please use your real name when posting.
The ReportBuilder barcode component currently only supports the addition of
a check digit to the UPC-A and EAN13 barcodes. All other check digits will
need to be added manually using its specific calculation method. This is a
feature we will consider adding to a later version of ReportBuilder.
You can use the Band.BeforePrint event to manually assign the Data property
of a barcode. Something like the following will populate it with three
separate field values.
ppBarcode.Data := ppDBPipeline['Field1'] + ppDBPipeline['Field2'] +
ppDBPipeline['Field3'];
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
checksum
http://en.wikipedia.org/wiki/Code_39
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
thanks for the help. Have you the code also in delphi?
thanks
Michael
--- posted by geoForum on http://delphi.newswhat.com
const
// jeu de caratère pour code 39
CharSet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-._$/+%';
// Génére le checksum modulo 43 pour le code 39
function Generateur_cheksum(val: String) :String;
var
x,i: Integer;
s :String;
begin
x :=0;
s :='';
for i:=1 to StrLen(Pchar(val)) do
begin
x := x + (Pos(val[i],CharSet)-1);
// Calcul du checksum pour code 39 (modulo 43)
s := CharSet[(x mod 43)+1];
end;
Result := val+s;
end;
J-Pierre