I have a report that includes a field in the footer that calculates a total for one of the detail fields, and another detail field that calculates a percentage from the total.
Field in detail line: [Orders]
Total field in footer: =Sum([Orders])
Percentage field in detail line: =[Orders]/Sum([Orders])
This works fine with most query parameters, except when query parameter [Option] = “X”, in which case [Orders] works out as null, which causes the total and percentage fields to give an error message: “The expression is typed incorrectly, or it is too complex to be evaluated….”; i.e., null/sum(null) cannot be calculated.
How can I make the total and percentage fields conditional so that if [Option] = “X” (which makes [Orders] = null) then the total and percentage fields are displayed as blank instead of causing the error message?