﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Reporting Services / Reporting Services 2005 Development  / Currency Format / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 05:47:58 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Currency Format</title><link>http://www.sqlservercentral.com/Forums/Topic783197-1063-1.aspx</link><description>Hi Becklery,Very good source.Thank you,Yumi</description><pubDate>Thu, 10 Sep 2009 09:15:59 GMT</pubDate><dc:creator>YumiPhx</dc:creator></item><item><title>RE: Currency Format</title><link>http://www.sqlservercentral.com/Forums/Topic783197-1063-1.aspx</link><description>Jeff, Thanks for quick reply. Don't worry about confusing the forum name.  I am new in Microsoft world, so you code is very helpful for me.  I will apply Charindex and Nullif function next time.Thanks again,Yumi</description><pubDate>Thu, 10 Sep 2009 08:27:32 GMT</pubDate><dc:creator>YumiPhx</dc:creator></item><item><title>RE: Currency Format</title><link>http://www.sqlservercentral.com/Forums/Topic783197-1063-1.aspx</link><description>Hi, YumiPhx.You can have a try of [url=http://www.raqsoft.com/]RAQ Report[/url]. As I know, it provides a lot of useful string functions for developers as shown below:[img]http://www.runqian.com.cn/wp-content/uploads/2008/09/2008-09-28_112218.jpg[/img]</description><pubDate>Thu, 10 Sep 2009 07:20:05 GMT</pubDate><dc:creator>becklery</dc:creator></item><item><title>RE: Currency Format</title><link>http://www.sqlservercentral.com/Forums/Topic783197-1063-1.aspx</link><description>Ah dang... thanks for the feedback, Yumi.  I've gotta remember to read the name of the forum I'm trying to answer the question on.  I was thinking pure T-SQL solution which isn't appropriate for this RS case.  You did it the right way... letting the service do the formatting after you've nailed the correct value.I don't use reporting services enough to know why your reports aren't coming out in color, niow.  I'd be tempted to just say "check the Windows printer settings" but I'm just not sure.Hopefully, someone can help with that.</description><pubDate>Wed, 09 Sep 2009 20:04:25 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>RE: Currency Format</title><link>http://www.sqlservercentral.com/Forums/Topic783197-1063-1.aspx</link><description>Hi Jeff,Thank you so much for your reply.The fields that selected for the report are from SQL server BD,define as (Float, null).  When I set the Currency format in RS as Cit give me 2 decimals.  If I set C0, it will remove the decimal but round it up automatically.I tried to use your suggestion but somehow I am having problem with Charindex for those number greater than 7 digits...No clue why.Finally, I used FLOOR function and it works fine.Select Floor(floatNumberColumn)from Table1That give me the number without decimal without round it.  Then I use the C0 format for report.Now I have another problem.  Yesterday, I set up Visual Studio Team Foundation Server and now I can not print my report in Color any moreReport only come black and white.  Do you hear this problem before?Thank you very much for your help,Yumi</description><pubDate>Wed, 09 Sep 2009 14:48:50 GMT</pubDate><dc:creator>YumiPhx</dc:creator></item><item><title>RE: Currency Format</title><link>http://www.sqlservercentral.com/Forums/Topic783197-1063-1.aspx</link><description>[quote][b]YumiPhx (9/4/2009)[/b][hr]Hi all,Do you know how to cut off the decimal for the Currency format without ROUNDING up the number?example: $4,816,220.65 I want the number show on report:  $4,816,220 NOT $4,816,221your help is much appreciated,Yumi[/quote]First of all, you should never store formatted data in the database and you usually shouldn't format data in SQL Server.  It's much better for a dozen reasons to do the formatting in the GUI.Also, without knowing the underlying datatype of the data you want to convert, I can only guess that you have the data stored as VARCHAR (again, that's a VERY bad thing to do).  Here's how to preserve the formatting you requested on a VARCHAR...[code="sql"]--===== Create a data sample... this is not a part of the solutionDECLARE @SomeFormattedColumn VARCHAR(20)    SET @SomeFormattedColumn = '$4,816,220.65'--===== Solve the problem SELECT LEFT(@SomeFormattedColumn, LEN(@SomeFormattedColumn)-3)[/code]Of course, that will work correctly ONLY if all your data has a decimal point and two decimal places.  You could use this as a bit of a guarantee...[code="sql"]--===== Create a data sample... this is not a part of the solutionDECLARE @SomeFormattedColumn VARCHAR(20)    SET @SomeFormattedColumn = '$4,816,220.65'--===== Solve the problem SELECT LEFT(@SomeFormattedColumn,              LEN(@SomeFormattedColumn)           - ISNULL(LEN(@SomeFormattedColumn)                  - NULLIF(CHARINDEX('.',@SomeFormattedColumn),0)+1             ,0)            )[/code]The numeric functions in that will be faster than doing multiple CONVERTs or CASTS or even using REVERSE.... and now you see why you shouldn't store or create formatted data in SQL Server. ;-)</description><pubDate>Sat, 05 Sep 2009 10:27:46 GMT</pubDate><dc:creator>Jeff Moden</dc:creator></item><item><title>Currency Format</title><link>http://www.sqlservercentral.com/Forums/Topic783197-1063-1.aspx</link><description>Hi all,Do you know how to cut off the decimal for the Currency format without ROUNDING up the number?example: $4,816,220.65 I want the number show on report:  $4,816,220 NOT $4,816,221your help is much appreciated,Yumi</description><pubDate>Fri, 04 Sep 2009 14:53:22 GMT</pubDate><dc:creator>YumiPhx</dc:creator></item></channel></rss>