SSRS Expression syntax with Iif Else

mburk1968
mburk1968 used Ask the Experts™
on
I have the following expression

=Iif(Parameters!ShowCost.Value="Y","Cost: " + CStr(Fields!std_cost.Value) + " ","") + Iif(Parameters!ShowPrice.Value="Y","Price: " + CStr(Fields!std_price.Value),"") + Iif(Fields!ETADate.Value="01/01/1900"," NO ETA"," ETA: " + CStr(Fields!ETADate.Value))

Open in new window


I need to change this section so that if the ShowPrice = "Margin" then Price would be NPrice
Iif(Parameters!ShowPrice.Value="Y","Price: " + CStr(Fields!std_price.Value),"") + 

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Business Intelligence Developer and Analyst
Top Expert 2015
Commented:
Could you please make clarity in your question?

It's hard to understand.

Try this if it can solve the issue.

=Iif(Parameters!ShowCost.Value="Y","Cost: " + CStr(Fields!std_cost.Value) + " ","") 
+ Iif(Parameters!ShowPrice.Value="Margin","Price: " + CStr(Fields!NPrice.Value),"") 
+ Iif(Fields!ETADate.Value="01/01/1900"," NO ETA"," ETA: " + CStr(Fields!ETADate.Value))

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial