SSRS 2005 Format colum based on name

In SQL 2005, I have a report with a matrix. The report displays information grouped by a column called constituents. By defual the value data is displayed in a number format with 2 decimals, which is fine for every column except for 1. I want that column to be displayed with no decimals.

I've tried going into the matrix box properties for that field and on the format tab under the format code I put the following two expressions in:

=IIF(Fields!ConstituentName.Value="S#","g","F")

=IIF(Fields!ConstituentName.Value="S#","d0","F")

When I run the report, the S# column is still showing with 2 decimals, how can I get that column to display without decimals and keep every other column at 2 decimals?

eseincAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
eseincConnect With a Mentor Author Commented:
I was able to make it work using the following format expression

=IIF(Fields!ConstituentName.Value="S#","n0","F")

Thank you for your help though.
0
 
planoczCommented:
try something like this...

=IIF(Fields!ConstituentName.Value="S#",Format(Fields!ConstituentName.Value,"###",Format(Fields!ConstituentName.Value,"###.##" ))

0
 
eseincAuthor Commented:
I tried that and I'm getting an error

Too many arguments to 'Public Function Format (Expression As Object, [Style As String = ""] ) As string.
0
 
eseincAuthor Commented:
Following format code worked:

=IIF(Fields!ConstituentName.Value="n0","g","F")
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.