1

I'm stuck on an expression. Below is programmatically what i want to do, but SSRS is not having it... How can I get this to work?

=IIf(Fields!TransTypeLabel.Value = "Hour", Fields!SalesAmount.Value, IIf(Fields!TransTypeLabel.Value = "Fee" AND Fields!CategoryId.Value = "TIME_FEE", Fields!SalesAmount.Value, 0), 0)
Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
jhowe
  • 10,198
  • 19
  • 48
  • 66
  • 2
    Take the final " , 0" out (but not the end brace). You also have missed .Value (or .Label depending on what you actually want) from the end of some field references. e.g. Fields!TransTypeLabel should. be Fields!TransTypeLabel.Value . Or maybe that was a type and should have read Fields!TransType.Label ? – Alan Schofield Mar 30 '17 at 17:09
  • You're right it was the extra , 0 that I needed to take out! thanks. Please provide an answer and i will mark it. – jhowe Mar 31 '17 at 13:26
  • all done, glad you got it sorted. – Alan Schofield Mar 31 '17 at 19:44

1 Answers1

1

ake the final " , 0" out (but not the end brace). You also have missed .Value (or .Label depending on what you actually want) from the end of some field references. e.g. Fields!TransTypeLabel should. be Fields!TransTypeLabel.Value . Or maybe that was a type and should have read Fields!TransType.Label ?

Alan Schofield
  • 19,839
  • 3
  • 22
  • 35