Solved

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

Posted on 2008-10-09
5
677 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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

732 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