Link to home
Start Free TrialLog in
Avatar of newjeep19
newjeep19Flag for United States of America

asked on

SSRS expression problem for VS2012 Report viewer report IIF

I have a report that I am building in Visual Studio Reportviewer. I need for one of the texboxes in the matrix(table) to compare two fields. The two fields equal certian data then in that textbox show the value (data) of a third field. Below is an example of what I am talking about.
=IIF(Fields!EDU_MARKET.Value = "21" AND Fields!EDU_CLASS_NM.Value = "Sales University", Fields!STAFFCNT21.Value,
IIF(Fields!EDU_MARKET.Value = "22" AND Fields!EDU_CLASS_NM.Value = "Sales University", Fields!STAFFCNT22.Value,
IIF(Fields!EDU_MARKET.Value = "23" AND Fields!EDU_CLASS_NM.Value = "Sales University", Fields!STAFFCNT23.Value,
IIF(Fields!EDU_MARKET.Value = "24" AND Fields!EDU_CLASS_NM.Value = "Sales University", Fields!STAFFCNT24.Value, etc.....

So In this examplr if EDU_MARKET equals 21 and EDU_CLASS_NM equals Sales University then display/show the data in STAFFCNT21
then proceed to the nes IIF statement.
ASKER CERTIFIED SOLUTION
Avatar of grendel777
grendel777
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial