How To Add Separator In Number??? 关注

0
Avatar
Legacy Poster

my file & excel DB https://drive.google.com/open?id=0B6klgATcAs6KaW5VOXljSWFIYXM

how to add separator for "gia ban" object???

i like to display 200.000 (with dot separator) instead of 200000 (without dot)

// sorry for my very bad English :(

 

5 评论

0
Avatar
Ian Cummings
版主
评论操作 固定链接

In the properties for the data source that links to the Excel field in question, select the "Data Type" tab and choose the "Number" option for type and then a locale such as Spanish that uses a dot for a thousands separator.

0
Avatar
Legacy Poster
评论操作 固定链接

In the properties for the data source that links to the Excel field in question, select the "Data Type" tab and choose the "Number" option for type and then a locale such as Spanish that uses a dot for a thousands separator.

i can't find "data type" tab. help me pls.

here is my screenshot image

http://pik.vn/2016c2f910eb-3e56-4be3-9b63-1aef76934b5b.png

0
Avatar
Ian Cummings
版主
评论操作 固定链接

Hmmm, it looks like you have an older version of BarTender.  Instead you should click on the "More Options" button, and enable VB Scriping for an OnProcessData VB script.  You'd then write an expression something along the lines of the following if you're wanting the continental style thousands separator: value = FormatNumber(value,0,true)  Or the following if you want a decimal point to three places:  value = FormatNumber(value,3)

0
Avatar
Legacy Poster
评论操作 固定链接

Hmmm, it looks like you have an older version of BarTender.  Instead you should click on the "More Options" button, and enable VB Scriping for an OnProcessData VB script.  You'd then write an expression something along the lines of the following if you're wanting the continental style thousands separator: value = FormatNumber(value,0,true)  Or the following if you want a decimal point to three places:  value = FormatNumber(value,3)

i do as u said but it's show error #6900 as following:

http://pik.vn/2016005d75da-024f-4674-9063-a6a49babd181.png

0
Avatar
Ian Cummings
版主
评论操作 固定链接

Perhaps the value is seen as a string and thus we need to convert it before formatting as a number:

 

value = FormatNumber(CDBL(value),3)

 

Another, not so elegant approach, but which should work for you, could be to have three sub-strings in the one text object.  The first sub-string would be the field in question with that last three digits truncated, the second being screen data of a value of ".", and the third being the field again which only keeps that last three digits.

请先登录再写评论。