Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSRS Number - Custom Format Issue Expand / Collapse
Author
Message
Posted Thursday, September 26, 2013 4:35 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, July 25, 2014 10:05 AM
Points: 122, Visits: 292

Hi Please find the attached snapshot for SSRS Custom Number format issue.

I am using as Number format :- #,##0.00%;(#,##0.00%)
Font Format :- IIF(ReportItems!txtBox4.Value < 0 "Red" , "Black")

But the result is coming with 0.00% as 3 type Black, Red(Without bracket) and Red(with bracket)

Can you please let me know how #,##0.00%;(#,##0.00%) work ?


______________________________________________________________________

Ankit
MCITP Database developer SQL 2008,MCTS Database Administration SQL 2008
"Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose.
You are already naked. There is no reason not to follow your heart.”


  Post Attachments 
SSRS Issue.png (9 views, 31.67 KB)
Post #1498757
Posted Thursday, September 26, 2013 4:38 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:00 AM
Points: 13,741, Visits: 10,713
The red within a bracket is negative, so that one is correct.
The 0.00% without bracket is maybe slightly below zero, but it is rounded to zero by SSRS?




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1498759
Posted Thursday, September 26, 2013 6:00 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: Moderators
Last Login: Today @ 6:19 AM
Points: 1,816, Visits: 3,462
for testing, why not increase the decimal places in your format string to see what numbers you're dealing with (and therefore why you're getting the styles applied). alternatively, just add another column to show the true numbers and remove it afterwards. Saves you from guessing...


Steve.
Post #1498785
Posted Friday, September 27, 2013 8:29 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 6:07 AM
Points: 2,274, Visits: 588
In the Color property of your text box, not in the Format property.

Please add your expression to the Color property of the text box, something like this

=IIF(ReportItems!Textbox15.Value < .05, "Red", "Blue")

hth



Tom in Sacramento

For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1499424
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse