Search code examples
c#reporting-servicesreportbuilder3.0ssrs-expression

Report Builder not showing IIF result


I'm trying to modify a Report Builder report (Visual Studio 2013) and it's not displaying four expressions. The following field is coded like this and works just great!

=First(Microsoft.VisualBasic.Interaction.IIF(Fields!ISPASS.Value = "Y", "YES", "NO"), "DataSet1")

However, I have 4 other fields coded exactly the same way but with different field values like this:

=First(Microsoft.VisualBasic.Interaction.IIF(Fields!ISSUCCESSFUL.Value = "Y", "YES", "NO"), "DataSet1")

That don't display a "YES" or "NO". In this particular field, I am supplying it with a "N". Here is the RB snipit where the PASS expression works great:

enter image description here

And here is a portion of my PDF from this report:

enter image description here

Here is what the data looks like for those fields I'm having the issue with (don't worry about the misspelling on EXCEPTIONAL, it is misspelled everywhere and that isn't the issue):

enter image description here

Here is the C# code used to populate the XSD file:

if (result.Any()) {
  foreach (var item in result) {
    dtResult.Rows.Add(new object[] {
      item.FULLNAME.ToUpper(), item.STORENUM, item.SSID, item.EVALDATE,
      item.EVALYEAR, item.ISEXEPTIONAL, item.ISHIGHSUCCESS,
      item.ISSUCCESSFUL, item.ISUNSUCCESS, item.ISPASS, 
      item.JUSTIFICATION, item.OVERALPERFORMANCE,item.SUPERCOMMENT,
      item.curManager.ToUpper(), item.empType, item.questionNo,
      item.questionDescript, item.questionShortTitle, item.questionPass,
      item.questionComment
    });
  } 
}

And here is my XSD layout:

enter image description here

I know this isn't going to be easy to figure out what's wrong, but watching the data I provide to the report looks just fine. If no one has any ideas, then I guess I will have to rewrite this thing in Crystal Reports and go from there (??).


Solution

  • Just as an elimination process, have you tried just dumping out the Field values instead of using an expression, just to make sure the data getting passed to the report is exactly how you expect it to be?

    It looks like it's your dataset that is the issue. Try creating a table and adding all the fields from your dataset just by dragging them onto it. You should then be able to see exactly what is coming from the dataest.