Using Round() Instead Of Decimal() S’abonner

0
Avatar
Legacy Poster

Hi All,
Previously we are using another software to create these Industrial Labels at that time we are able to produce decimal values even if the value is empty in decimal part, i.e if the value=123 and if i use the meathod decimal() then the o/p will be 123.00 And here in Bartender there is no such option Decimal() and we are Using Round() instead of that but i am not able to get decimal value if the decimal portion of the number is having "0" or NULL value.Is there any way to display decimals by default if it is 0 or null.

Thanks,
Phaneendra

Please let me know if you are not clear about what i say.

2 commentaires

0
Avatar
Ian Cummings
Modérateur
Actions pour les commentaires Permalien

If you want a number formatted to two decimal places they you should use a VB script to accomplish this.

With a number of some sort in the data source click on the "More Options" button, select the "VB Scripting" tab and then edit the "OnProcessData" event script with something like the below.

[code]value = FormatNumber(value,2)[/code]
0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

[quote name='Ian C - Seagull Support' timestamp='1323710194' post='1298']
If you want a number formatted to two decimal places they you should use a VB script to accomplish this.

With a number of some sort in the data source click on the "More Options" button, select the "VB Scripting" tab and then edit the "OnProcessData" event script with something like the below.

[code]value = FormatNumber(value,2)[/code]
[/quote]
Ian thanks a lot. Its working by replacing round() with FormatNumber()

Vous devez vous connecter pour laisser un commentaire.