Solved

SSRS 2005 Format colum based on name

Posted on 2011-09-20
4
266 Views
Last Modified: 2012-05-12
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
Comment
Question by:eseinc
  • 3
4 Comments
 
LVL 27

Expert Comment

by:planocz
ID: 36569813
try something like this...

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

0
 

Author Comment

by:eseinc
ID: 36569860
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
 

Accepted Solution

by:
eseinc earned 0 total points
ID: 36570025
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
 

Author Closing Comment

by:eseinc
ID: 36594777
Following format code worked:

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question