Solved

SSRS 2005 Format colum based on name

Posted on 2011-09-20
4
268 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Hi All, I am here to write a simple article to move SSRS (SQL Server Reporting Services) reports from one server to another. When I have faced the same issue to move reports those were developed by developer on development server and now need to …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

617 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