• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1426
  • Last Modified:


Hi ,
I have added following Expression in one of cell of my rdlc but i am getting an error.
=iif(  (ReportItems!textbox43.Value <> "N/A") AND (ReportItems!textbox46.Value <> "N/A"),(((1+ReportItems!textbox43.Value)/100)/((1+ReportItems!textbox46.Value)/100)-1),"0.00%")

If i remove the formula from the expression above,it works good,can any one tell me how to make above expression work.
Basically the logic is If ReportItems!textbox43.Value & ReportItems!textbox46.Value is not equal to N/A then (((1+ReportItems!textbox43.Value)/100)/((1+ReportItems!textbox46.Value)/100)-1) else 0.00%
Can any one help ASAP.
  • 3
  • 3
1 Solution
Hi.. could you tell us what the error message is and which part of the expression works? Looking at the formulae as it stands, you have the correct number of brackets and the structure of the IIF statement is correct.
aspnetdevAuthor Commented:
i get this #error and if i replace following parameter in IIF condition
with something like "This is a test",it works.
Try replacing



it could be that the values in texbox43 and 46 might not be numbers even though they look like numbers and hence it cant do the calculations.

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!

aspnetdevAuthor Commented:
You are correct shorak,actually the equation is becoming N/A/100 and hence no calculation can be done.Anyways i tried
=iif(  (ReportItems!textbox43.Value <> "N/A") AND (ReportItems!textbox46.Value <> "N/A"),((cint(1+ReportItems!textbox43.Value)/100)/((1+cint(ReportItems!textbox46.Value))/100)-1),"0.00%")

i still get #error.Can you help me more.
aspnetdevAuthor Commented:
and i tried this too....

i still get #Error.

Do the contents of textbox43 and texbox46 always say 'N/A' when its not a number or can they say something else too?

We also need to make sure that textbox43 and texbox46 are both numeric.
Are textbox43 and texbox46 are part of a table row? If so, then add 2 extra columns at the end and put the following expressions in each one:
1st column

2nd column

These two columns will tell us if the values in the two texboxes are numbers or not.. if they are then they both will say "True" (apart from when the two fields say 'N/A').
If you dont have a table then just create two textboxes and put the same expressions in each box. Both should say true. If so, then delete the extra columns/textboxes you just created. If you get 'False' when  textbox43 and texbox46 dont say 'N/A', then there is an issue with the data type.

Also it might be worth testing out each part of your rexpression. First, try the following expressions and see if you get an error..

=IIF (ReportItems!textbox43.Value <> "N/A" AND ReportItems!textbox46.Value <> "N/A","OK","Not OK")

= IIF (ReportItems!textbox43.Value <> "N/A" AND ReportItems!textbox46.Value <> "N/A",(cint(ReportItems!textbox43.Value)+1)/100,"0.00%")

= IIF (ReportItems!textbox43.Value <> "N/A" AND ReportItems!textbox46.Value <> "N/A",
((cint(­ReportItem­s!textbox4­6.Value)+1­)/100)-1 ,"0.00%")


= IIF (ReportItems!textbox43.Value <> "N/A" AND ReportItems!textbox46.Value <> "N/A",
 ((cint(ReportItems!textbox43.Value)+1)/100)/(((cint(­ReportItem­s!textbox4­6.Value)+1­)/100)-1) ,"0.00%")

The code snipet below should hopefully work for you.


= IIF(ReportItems!textbox43.Value <> "N/A" AND ReportItems!textbox46.Value <> "N/A",
((cint(ReportItems!textbox43.Value)+1)/100)/(((cint(ReportItems!textbox46.Value)+1)/100)-1) ,"0.00%")

Open in new window


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now