Hi all,
I have developed a report in which I need the thousand seperator to be a decimal point.
Instead of presenting the number as 12,923.23 i require that the representation be 12.923,23.
I have tried to customize the the format with the hash value but have had no joy. Any help would be much appreciated.
Ivan
Here's one way to do it. Also if this will be done on the fly, it probably will work best as a user-defined function. You could also nest all of the replace functions for a single select for production, but I did it this way to be more readable.
declare @.test money
Set @.test = '12923.23'
Select Replace(Convert(varchar(50),@.test,1),',','[,]')
Select Replace(Convert(varchar(50),@.test,1),'.','[.]')
Select Replace(Convert(varchar(50),@.test,1),'[,]','.')
Select Replace(Convert(varchar(50),@.test,1),'[.]',',')
print @.test
|||Thanks for the help, its much appreciated.
I ended up sorting out the issue by changing the language property to Italian on the table and entering 'N' in the format property in the desired column.
This then gives the numerical representation which I was looking for.It works because this is the way that the Italians and many other countries represent their numbers.
|||where will i write this code? i right click the textbox carrying the number.From the menu choose properties and then select format tab.Then in the expression area if i write this code , there is an error.Could you help me?|||
You must not write these code in expression editor.
you can write a code as a function in vb.net in report code editor. you need to call that fuction in expression editor.
you can impliment custom code to get the desired results
No comments:
Post a Comment