question

BillGreen-6560 avatar image
0 Votes"
BillGreen-6560 asked IgorGelin-0063 answered

#Error Report Builder SSRS

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Joyzhao-MSFT avatar image
0 Votes"
Joyzhao-MSFT answered BillGreen-6560 commented

Hi @BillGreen-6560 ,
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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes I am writing an expression in report builder 3.0, with two different datasets, and they are not group.

I have try to uses the lookup, for 2 days but it would not work at all.

The If statement, and switch statement will work with the two different datasets but I still run into the same issue. When it opens to All in the parameter in the expression it prints out #Error.

When I select the drop down list and choose a name it will do the calculation.

I try in the system, probably writing them down wrong but CStrig(, Cint, Cobj, Cbol, for the parameter, but that did not help.

if I just write an if statement in that expressing it works =IIf(Parameters!Officer.Value="ALL","T","F")

0 Votes 0 ·
IgorGelin-0063 avatar image
0 Votes"
IgorGelin-0063 answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.