Resize The Number After Decimal Point S’abonner

0
Avatar
Legacy Poster

Hello guys,

 

I'm creating a price label for my store, I would like to know if there is a function can be used to resize the number after the decimal point.

The result should be like this :

 

$30.00

 

 Your help would be greatly appreciated.

Ronald

5 commentaires

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

The only way I know how to do this is to have the fields controlled separately.  They can have the same data source but one would need to be a currency and the 00 would need to be text so that you can use the search and replace transform function as well as having it underlined.  I also set one to be right justified and the other to be left justified so that they are always next to each other.  I've attached an label with an example for you to look at.

 

[attachment=813:CurrencyExample.btw]

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

I've attached a format where this is set up. It uses the Word Processor tool in order to custom style different parts of the same object. Used in conjunction with imported named sub-strings and a bit of scripting to split it up correctly, you should see how it functions when you open it up.

 

Made in 10.1

0
Avatar
Legacy Poster
Actions pour les commentaires Permalien

I made it ! You guys are awesome. Thanks for help !

0
Avatar
Vicki Justice
Actions pour les commentaires Permalien

If someone still has this example label format can I also get it? I also need to make the cents smaller than the dollar portion of a price field.

 

Thank you!

0
Avatar
Pete Thane
Actions pour les commentaires Permalien

Different to the above but this works.

Depending on where your currency value comes from you may need to use Event Controlled Visual Basic Script possibly OnNewRecord if from a database or else OnIdenticalCopies would probably work.

  • Add a field onto your template that will contain the currency and link it to the source of the information (ie your database or manual Data Entry form etc). Move this field off to the side of the label so it is outside the printable area. Adjust the Type of this field to Currency. 
  • Give the field a "name" using the Change Data Source Name Button

 

  • Add your proper currency field onto the label and make this field a Visual Basic field and as mentioned above you may need to make this an Event Controlled Script
  • Click the Edit Script button. If using an Event Controlled Script scroll down the column on the left to find the correct critera (OnNewRecord or OnIdenticalCopies for example) and select the one you require
  • In the large central script box type

Value = 

and then from the column on the right scroll down to your Named Data Source (from above) and double click on it and this will then add your named field to the code. I named my field InputCurrency and so my code is as below

  • Click Close to exit the editor and then click on the Copy and Paste buttons to add a second identical sub-string to your field.

  • Make sure the top field is highlighted and click on the Transforms button and click on Truncation and set this to Discard two character on the right.
  • Now highlight the bottom sub-string and on the Truncation set this to Keep characters on right as 2.
  • Click Close to come out of your field.
  • When you now click on your field on the label you will have two distinct sub-strings that you can choose. With whichever one selected change the font size for this to match the way you want your data to be displayed. #

 

I hope this helps

Pete

 

# This works for BarTender 2019 but for 2016 you need to enable a set Font per Data Source option (or something like that - cant remember the exact name now) which can be found in the Font selection screen in the left hand column of the field Properties and when that is turned on, you can highlight each individual sub-string in the Properties and amend the font for each.

 

 

Vous devez vous connecter pour laisser un commentaire.