Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • 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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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