Better yet, exclude them from the report with a record selection formula.
Suppressing the line can be dangerous, as it will still evaluate in any summary operations such as a COUNT or a SUM. A zero will not mess up a SUM, but it will get in the way of a COUNT.
Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
If some of the values of the 3 colums were negative, and the sum netted to zero, this would not make it through to the report. I am not sure that is what is wanted.
Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
I see your point, although there was no indication that the fields could be negative. Then how about for {@RecordSum}:
abs({Col1})+abs({Col2})+abs({Col3})
and a group select of:
{@RecordSum} > 0
Maybe I'm being dense here, but I think that SV's solution will only return records where all three columns are not equal zero, when the request is to eliminate a row only if all three ARE equal zero.
I think Checkai's suppression formula would work though also.
Well, I think you've missed my point. I think using a record select that says all three columns <> 0 will eliminate rows where one or two are = 0. If data looks like this, I think your record select will return only Row 2, when Rows 1 to 3 should be returned:
I was willing to believe I was wrong, but tested this, and the only record returned in my example was Row 2. The parentheses add nothing to this record select statement--the record select will only return those values not equal to zero for each field.
LBass - I think using the record to eliminate unwanted data rather than your original formula is the better way to go. Not so much because of the potential problems from adding negative numbers but more to the point of slowing down the report by bringing in unwanted data to be processed.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.