• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 282
  • Last Modified:

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?

0
eseinc
Asked:
eseinc
  • 3
1 Solution
 
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:
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
 
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.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now