Share via

#Error Report Builder SSRS

Bill Green 6 Reputation points
2021-08-31T18:00:47.317+00:00

I am working with a exp value and on the true statement I am getting an #Error

Can anyone help me out. What I am trying to do, in a drop down menu, when selected All, it is just blank, when they select a name it figures the calculation. I try to take the 0 out so it is blank but it still #Error

In the true part it #Error

=IIf(Parameters!Officer.Value="ALL", "0",Sum(Field!MyBalance.Value, "ABC")/Sum(Fields!FullBalance.Value, "TotalBalance"))

What am I doing wrong

SQL Server Reporting Services
SQL Server Reporting Services

A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Igor Gelin 21 Reputation points
    2021-09-03T00:22:03.513+00:00

    IIF is sensitive to the data type of the expressions.
    IIF(1=1, 5, 25) works, but IIF(1=1, "5", 25) would not work because "5" is a string, and 25 is an integer.

    HTH,

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

  2. Joyzhao-MSFT 15,651 Reputation points
    2021-09-01T02:46:54.433+00:00

    Hi @Bill Green ,
    Is the scope of "ABC" and "TotalBalance" in the expression you use a data set or a group? If they are from different datasets, you may need to use functions such as lookup, LookupSet, etc.
    If it is not in the above situation, could you share the test data to help you resolve the issue?
    Best Reagrds,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.