Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2010-02-15 : 12:14:58
|
There are many many textboxes with numbers coming from the databse into each textbox.Do you know an easy way on how I can divide each number in each textbox by 1000 ?At present I have set format to N so that I get comma separated values.Please note that I only want to do this on the report and not in the SQL.Thanks |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-15 : 12:17:05
|
so you mean you need comma after every 3 digits?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2010-02-15 : 12:23:14
|
No,i.e. 147653.44 to 147.653 |
|
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2010-02-15 : 12:23:54
|
Note that I am already using the format N to do the comma separated value as mentioned before.thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-15 : 12:29:29
|
doesnt division operator work?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2010-02-15 : 12:40:09
|
Yes but how is it possible to applpy the division by 1000 to all the textboxes in one go rather than doing this one at a time.Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-15 : 12:46:28
|
quote: Originally posted by arkiboys Yes but how is it possible to applpy the division by 1000 to all the textboxes in one go rather than doing this one at a time.Thanks
what??you want to add /1000 to all the textboxes? there's no simple way to do that rather than adding to each textbox. However, one hack here would be to open report in xml format and then do xml editing (find and replace) but problem is if you didnt do it carefully you'll end up breaking the report itself and it wont render at all. So if you're attempting this, make sure you first have copy of working report backed up somewhere.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2010-02-15 : 13:27:49
|
ok, thank you |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-16 : 01:02:00
|
welcome ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|