I have a moderately complex report and toward the bottom I have some summary / calculations being done on the above data. One such calculation simply adds various fields across the report. For example: TextBx1 + Txtbx2 + Txtbx3 etc. Now this might be OK if it was one off but I actually want to do an IIF with it and that IIF statement gets quite long and convoluted. For example:
IIF((TextBx1 + Txtbx2 + Txtbx3...) > 0, (TextBx1 + Txtbx2 + Txtbx3...), Format(0, "F0"))
------Eval section-------------- -------------True---------- -----False----
It would be easier to read AND maintain if I could put this val into a variable as such:
IIF(Variables!SumTxt1_10 > 0, Variables!SumTxt1_10, Format(0, "F0"))
However when I try to use a variable in such a manner I get Variable values cannot be used in report language expressions.
So any tips on cleaning up / improving this IIF would be greatly appreciated.
JB