Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > Reporting Services
Reporting Services SQL Server Reporting Services. Please specify which version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Reporting Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 15th, 2006, 05:58 PM
Registered User
Join Date: Mar 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Manipulating Data with Expressions

I WOULD LIKE TO DO A CONDITIONAL FORMATING ON A FIELD. This is what I'd like it to do:- The query has NULLs and blanks in some fields and I want the field on the report to display a "0" (zero) If null values. How would I write the expression. The expression below errors out.

=IIf(Fields!Cost.Value IS NULL, "0", Fields!Cost.Value)

Thanks for any help.

Old May 7th, 2006, 10:56 PM
Authorized User
Join Date: Dec 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts

Hi Baaul,

i too faced the same prob few days back, i couldn't resolve it in report designer.
But i checked for null values at the backend.

For eg.
SQL Server
SELECT isNull(Cost, -999) FROm tablename.

In Report Designes use the code like the one below
=IIf(Fields!Cost.Value = -999, 0, Fields!Cost.Value)

Hope the reply is helpful..


Old June 22nd, 2006, 10:14 AM
Registered User
Join Date: Oct 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts

You may be able to use switch

=switch(Fields!Cost.Value IS NULL,"0")

Hope this helps.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Manipulating data in access tables using VBA jass1317 Access VBA 1 January 25th, 2006 05:32 PM
Manipulating Data Problem - - - - Please Help! sendoh11 ASP.NET 1.0 and 1.1 Professional 1 June 29th, 2005 02:40 AM
Manipulating the data in db dungey PHP Databases 4 January 6th, 2005 11:31 AM
manipulating data in DAO jimmy Access VBA 2 November 19th, 2003 10:55 AM
Manipulating data in ASP sri2004 Classic ASP Databases 0 June 17th, 2003 07:19 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.