Displaying blanks instead of '0' or '0.0' values

What sort of formating can I use (if any) to display values that come in as "0" or "0.00" as just blanks (or, even better, a particular value of my choosing, such as "-") in a report? To note, the record values come back from the stored procedure as "0" or "0.0," as examples. Is there a formatting method or format string that can blank these out, or will I need to do some sort of conditional checking to see if a value is 0, and, if it is, choose to not display it?

Feedback appreciated. Thanks.

0
rbergeman
5/29/2008 8:30:11 PM
asp.net.ssrs 4514 articles. 1 followers. Follow

2 Replies
1820 Views

Similar Articles

[PageSpeed] 2
Get it on Google Play
Get it on Apple App Store

Hi,

=iif(Fields!EmployeeID.Value = 0 OR Fields!EmployeeID.Value = 0.0,"-",Fields!EmployeeID.Value)

Try this one, it will replace '-' if the employeeid is 0 Or 0.0.


Regards,
Sasi

Please remember to click "Mark as Answer" on this post if it helped you.
0
sasi
5/30/2008 5:20:20 AM

Great! I ended up using (assuming a field named "Volume"):

=iif(Fields!Volume.Value = 0, "-", FormatNumber(Fields!Volume.Value, 0))

This will display a "-" for values that equate to 0, and a formatted number (say, 45,500,000) for anything else.

I made note that even my decimal values (such as a currency value) would format to "-" if their value was 0.0, so I removed the additional OR statement.

Thanks for the help!

Cheers,
rb

0
rbergeman
5/30/2008 1:24:24 PM
Reply:

Similar Artilces:

''''''''''''''''''''
Name: haznen Email: haznenatyahoodotcom Product: Gran Paradiso Alpha 8 Summary: '''''''''''''''''''' Comments: '''''''''''''''''''''''''''''''''''' Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061204 UGES/1.7.2.0 GranParadiso/3.0a1 From URL: http://www.mozilla.org/projects/granparadiso/ Note to readers: Hendrix gives...

'''''
Name: mario Email: ramar17atfastwebnetdotit Product: Gran Paradiso Alpha 2 Summary: ''''' Comments: K: Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2) Gecko/20070206 GranParadiso/3.0a2 ...

Cannot Start Reporting Services ;The found version is 'T.0.8.39'. The expected version is 'C.0.8.39'.
I reinstalled reporting services on a default instance but I am getting this error?Does anyone know how to fix this...

mvctoolkit Assembly 'MVCToolkit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a high
I have visual studio 2008 SP 1 .I created a new MVC Web Project and added a reference to the MVCToolkit dll.I tried to build and it shows following exception Error    5    Assembly 'MVCToolkit, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'System.Web.Extensions, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'    f:\MVC\MVCProjects\MyFirstMVCApplicati...

Unable to set '0' value to 'identity_burn_max'
Hi , Server Details : Solaris Sparc Database : ASE 12.5.3 (with no ESDs) We are having a table and one of the column in the table is an 'numeric (10,0) identity' column. I am trying to reset the identity sequence to 1 using dbcc set_identity_burn_max(dms_uat,updateWorkBalagopalanS14470,'1') This is working fine. But if I try to reset the identity column value to '0' dbcc set_identity_burn_max(dms_uat,updateWorkBalagopalanS14470,'0') I am getting the following error. 'Error: Number (15014) Severity (16) State (2) Server (I...

'SetNull' vs '= 0'
We have a DLL that we need to pass a PB structure to that contains two pointer fields used by the DLL. We need to initialize them to null (no pointer address) and need to understand whether to use SetNull or equate the ulong to zero (=0). Will both do the same thing? Phil Yandel Business System Consultant Household International Philip.C.Yandel@household.com (630)521-6160 Set the ulong to 0. On Fri, 24 Aug 2001 12:58:53 -0400, in powersoft.public.powerbuilder.general Phil Yandel <philip.c.yandel@household.nospam.com> wrote: >We have a DLL that we need to pas...

Could not load type 'namespace.User' from assembly 'assemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Hi Folks,   I am having a very frustrating time trying to resolve an issue I have been experiencing. I have 1 solution which contain three different projects within it.   The first project has NO reference to anything in the other two.   The second project references the DLL produced by the first project.   The third project references the DLL produced by the first project and also the DLL produced by the second project.  Now my issue is that in the third project i instantiate some web custom controls  from the DLL in the second project and the desired...

Item has already been added. Key in dictionary: '0' Key being added: '0' gridview
i'm trying to add a key and value to the hashtable and then put that hashtable in Session and this works fine but i'm getting error when i try to browse to different pages in gridview and here is the error message: Item has already been added. Key in dictionary: '0'  Key being added: '0' gridview here is my code: Hashtable ht = new Hashtable();  //declare in class level variable  protected void gv_RowDataBound(object sender, GridViewRowEventArgs e) {        ............      &nbs...

'yahoo mail beta' and 'Wordpress' login don't work anymore after update to firefox 2.0.0.5
Hi, I'm running Windows vista home premium and after the update to 2.0.0.5 i cannot login anymore to the Yahoo mail beta, that meas that the login page keeps reloading every second so i don't have the change to type in my loginname and password. I'm also running two sites on wordpress but i cannot login to both of them eighter. here is the problem that i can login but the screen keeps retrning to the login screen. This is also since the update. I also updated my java to 6V2 so that should not be the problem i guess.... If someone can help me, that would be great!...

'0' could not be set on property 'ActiveTabIndex'
Im using Ajax tab container inside the one of the Wizard step. and get this error " '0' could not be set on property 'ActiveTabIndex'." I have NOT set any ActiveTabIndex then why the heck i'm getting this error. (Why AJAX control never works as expected? most of the time we have to do some kind of hack in order to get them to work.) I think the index wants the number 0 not the character '0'  Steve Wellens My blog hmm..either you are not understading what i'm saying or i'm not saying it right.. First of all i haven't set any...

RE: [perl #37315] 'my' with 'if 0' retains old value
=20 > This is a bug report for perl from herington_dean@emc.com <mailto:herington_dean@emc.com> , generated with the help of > > perlbug 1.35 running under perl v5.8.4. =20 Use of 'my $v if 0' is deprecated. Please see: http://groups.google.com/group/perl.perl5.porters/browse_frm/thread/e665 bd4eefa7771c/7f2a47223bb7cecf?lnk=3Dst&q=3D%22if+0%22+group:*perl*&rnum=3D= 1&hl =3Den#7f2a47223bb7cecf --=20 Charles DeRykus ...

DataBinding: 'System.Collections.Generic.List`1[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' does not contain a property with the name 'states'.
Note: this is a mock-up, thus the hard coded states for testing purposes. I'm simply trying to pass up a generic list from my model to my controller and then use that list to bind to a Select. Model has: public class StatesModel { public static List<string> RetrieveAllStates() { List<string> states = new List<string> { "AL", "AK", "AZ"}; return states; } ...

'Value' should be between 'minimum' and 'maximum'.
I'm attempting to invoke with parameters:  Dim thing2 As New mydelsubPBStep(AddressOf pbStep) Me.Invoke(thing2, "setMax", dt.Rows.Count)      <---- this is where the error occurs   the delegate looks like this: Private Delegate Sub mydelsubPBStep(ByVal mode As String, ByVal value As Integer)   the function it's calling looks like this:Private Sub pbStep(ByVal mode As String, ByVal value As Integer) Select Case mode.ToLower Case "clear" ProgressBar1.Value = 0 Case "step" ProgressBar1.PerformStep() L...

Invalid use of '.', '!', or '()'. in query expression 'CType(e.Item.Cells(1).Controls(0), TextBox).Text'.
Hi ppl, hope u can solve my prob, i getting this error:<Code> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here If Not Page.IsPostBack Then BindData() End If End Sub Sub BindData() '1. Create a connection Const strConnStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=c:\inetpub\wwwroot\IT2691\speedy.mdb;" Dim objConn As New OleDbConnection(strConnStr) objConn.Open() '2. Create a command object for the query Const strSQL As String = "SELECT * FROM Products"...

Web resources about - Displaying blanks instead of '0' or '0.0' values - asp.net.ssrs

Resources last updated: 11/29/2015 8:30:25 PM