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

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?
LVL 17
MIKESoftware Solutions ConsultantAsked:
Who is Participating?
 
BrandonGalderisiConnect With a Mentor Commented:
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
 
BrandonGalderisiCommented:
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
 
MIKESoftware Solutions ConsultantAuthor Commented:
Didn't work I receive the same:    #Error

M
0
 
MIKESoftware Solutions ConsultantAuthor Commented:
Still get:    #Error
0
 
BrandonGalderisiCommented:
hmmm... I'd try the request attention link at the top and see what we're doing wrong here.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.