0
votes

I have SSRS report With 1 Parameter which I want to change datafield based on parameter selected value. I am using the following expression but when report runs value appearing as #error

=iif(Parameters!otype.Value = "order",
  Fields!ordernumber.Value,
  Fields!grnnumebr.Value)
2
How someone can verify even want to provide the answer to you? It is the matter of debugging. I think the value of order should be case sensitive. - Suraj Kumar
The syntax seems to be correct. What does the error message say when you preview it? Your field names may not have the correct CaSe (or number is spelled wrong for GRN - thought that wouldn't run at all). The value is also case sensitive as Suraj mentioned but that just would not match rather than cause an error. - Hannover Fist
thanks for guide.i had 2 parameters 'grn 'and 'order'.if i select 'order' its run perfect .but then i change parameter value to 'grn' then come as error. - ashan

2 Answers

0
votes

When you are previewing the report, press the refresh button in the toolbar.

Refresh

0
votes

Based on few assumptions, keeping your parameter as Text multiple value parameter something like below

enter image description here enter image description here

if you use below expression to get value

=Parameters!ReportParameter1.Value

In your case Parameters!otype.Value you will get Value and not label. Make sure you use value and not label.

enter image description here

enter image description here