Link to home
Start Free TrialLog in
Avatar of eseinc
eseincFlag for United States of America

asked on

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?

Avatar of Howard Cantrell
Howard Cantrell
Flag of United States of America image

try something like this...

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

Avatar of eseinc

ASKER

I tried that and I'm getting an error

Too many arguments to 'Public Function Format (Expression As Object, [Style As String = ""] ) As string.
ASKER CERTIFIED SOLUTION
Avatar of eseinc
eseinc
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of eseinc

ASKER

Following format code worked:

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