Decimal Delimiter 关注

Legacy Poster

Hello, i'm using bartender with the database connection.

But the database send me all decimal values with an "." as a delimiter. In germany you have to use the "," for numeric values.

I have managed the replace the . by , in the textfield, but now i have to use the numeric values in a barcode and this goes wrong.

As a sample i get:

Articelname;weight; pieces; customername
fresh meat; 12.50;2;Sample Customer

Now the barcode transfer the 12.50 to 1250kg.

My Idea was to convert the . to the , before generating the barcode. But i can't find the way to do this.

1 评论

Shotaro Ito
评论操作 固定链接

Hi Christian,
VB Script's Replace function does that.
In the barcode's datasource, select the substring you stored in weight. then [More options] > VB Script tab, enable VB Script and edit.
in OnProcessData event, paste code below.
[code]Value = Replace(Value,".",",")[/code]
Also, make sure you have no Validation in [More options] to remove "," character. Some barcode types doesn't accept "," character such as Code39 Regular. In that case please tell me what barcode you use.
Hope that helps.