The reason the formula doesn't work if you move the IsNull check to the end has to do with the way databases handle nulls and the fact that formulas with "and" or "or" are evaluated from left to right. If you compare a field with a null value to a specific value, the null values will always be false no matter what the comparison is. For example, if you do {table.field} <> 'S', all records with a value that is not 'S' will appear in the result but any record with a null value in the field will NOT be in the result. So, since reversing the order of the formula does the explicit comparison first, the nulls are filtered out there. If you check for null first, the nulls will be included and only the non-null values with be evalueated in the rest of the formula.
Since your Total Due is a somewhat complex formula, I would handle that by setting a suppress formula on the section where you're displaying the data. The formula would look like this: mailto:%7b@Total - {@Total Due} = 0
Since the records with a 0 total due will actually be included in the result set (the display of them is suppressed so that they don't appear) if you want to do any counts, you'll have to do something like this:
mailto:%7b@CountIt - {@CountIt } If mailto:%7b@Total - {@Total Due} <> 0 then 1 else 0
Then, instead of doing a count, you do a sum of mailto:%7b@CountIt - {@CountIt } to get a count of the records that are actually appearing on the report.
-Dell
------------- Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics
|