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 |
joe8079
Posting Yak Master
127 Posts |
Posted - 2012-02-23 : 11:39:36
|
Hello,I have a quick question: How do I keep trailing zeros in SSRS within an expression?For example, I have a value of 201.30 and it ends up getting converted to 20.13 in excel. Not sure why its doing this, but i've searching online for a fix for the last few hours and cant seem to find anything. Any help would be greatly appreciated. Further, a value like 54.00 in SSRS 2008 is getting converted to .54 when exporting to excel. Thanks, |
|
joe8079
Posting Yak Master
127 Posts |
Posted - 2012-02-23 : 11:43:18
|
Also, here is how the expression looks like in SSRS. if this value is 201.30, it ends showing as 20.13 when exporting to excel. =Fields!DEPOSIT_WITH_INTEREST.Value |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2012-02-23 : 12:08:45
|
Excel is really annoying a lot of the time when it autoformats things for you.Easiest thing to do is to open excel. Then Select the worksheet columns (as many as will be in your result). Shift click on the columns A,B,C,D,E etc.Then right click and go to format cells....Choose "text"Then Do your copy and paste from SSMS. Excel should screw with the data then and you can then go and set the format for each column as required.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
|
|
joe8079
Posting Yak Master
127 Posts |
Posted - 2012-02-23 : 12:36:48
|
Thanks, I appreciate the response, but I was hoping there was a way I could format the data in SSMS so there doesnt have to be any formatting in excel. The reason is the person recieving the report is a VP and I dont think they'll want to do any formatting in the report |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2012-02-23 : 13:10:18
|
well you can always send them the excel file. it keeps the formatting once you've set it.As far as I know, there is no way to stop excel mangling data.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
|
|
SMK
Starting Member
6 Posts |
Posted - 2012-02-24 : 00:55:55
|
how the data is displaye din the preview.it 20.13 or 201.30and also check n say me if u hav applied any formating to the text box.SMK :) |
|
|
|
|
|
|
|