?
Solved

Reporting Services SYNTAX help for EXPRESSION....????

Posted on 2008-10-09
5
Medium Priority
?
685 Views
Last Modified: 2012-05-05
Experts:

I'm using this field for displaying a PERCENTAGE calc of 2 different COUNT FIELDS in my RS Report.

=cint(count(Fields!ORDERID.Value, "OrderCount") / Fields!CALLCOUNT.Value*100)& " %"

However, on occasion one or both of the COUNT FIELDS will be NULL and so I get an #ERROR displayed in the report when this happens. I would like this percentage calculation to display "N/A" when this happens instead of the system standard #ERROR.

Can someone help me with the SYNTAX needed in order to do this?
0
Comment
Question by:MIKE
[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
  • 2
5 Comments
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22684572
Try this:

=iif(isnothing(cint(count(Fields!ORDERID.Value, "OrderCount") / Fields!CALLCOUNT.Value*100)& " %"),"N/A",cint(count(Fields!ORDERID.Value, "OrderCount") / Fields!CALLCOUNT.Value*100)& " %")
0
 
LVL 17

Author Comment

by:MIKE
ID: 22735683
Didn't work I receive the same:    #Error

M
0
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 2000 total points
ID: 22735932
Let's try a different approach :)
=iif(isnothing(Fields!ORDERID.Value) or isnothing(Fields!callcount.value),"N/A",cint(count(Fields!ORDERID.Value, "OrderCount") / Fields!CALLCOUNT.Value*100)& " %")

Open in new window

0
 
LVL 17

Author Comment

by:MIKE
ID: 22735957
Still get:    #Error
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22736877
hmmm... I'd try the request attention link at the top and see what we're doing wrong here.
0

Featured Post

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

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

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.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Suggested Courses

764 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