## still seeing supressed values in sum

## still seeing supressed values in sum

(OP)

Hi all

Have a report which data has duplicates in that I need supressed. I have a formula (@qty) in the details section and in the section expert area to suppress I have the formula below.

//This formula suppresses the Details line

//when there are duplicate values contained in the fields.

{ORD_DETAIL.OD_STOCK_CODE} = Next({ORD_DETAIL.OD_STOCK_CODE}) And

{ORD_DETAIL.OD_ORDER_NUMBER} = Next({ORD_DETAIL.OD_ORDER_NUMBER}) And

{@f_qty} = Next({@f_qty})

It suppresses the details ok but when I sum on {@qty} it still sums the supressed values.

Sure this is really simple for someone but driving me nuts. I have googled this over an dover but all the answers are so complex. - Help!

Have a report which data has duplicates in that I need supressed. I have a formula (@qty) in the details section and in the section expert area to suppress I have the formula below.

//This formula suppresses the Details line

//when there are duplicate values contained in the fields.

{ORD_DETAIL.OD_STOCK_CODE} = Next({ORD_DETAIL.OD_STOCK_CODE}) And

{ORD_DETAIL.OD_ORDER_NUMBER} = Next({ORD_DETAIL.OD_ORDER_NUMBER}) And

{@f_qty} = Next({@f_qty})

It suppresses the details ok but when I sum on {@qty} it still sums the supressed values.

Sure this is really simple for someone but driving me nuts. I have googled this over an dover but all the answers are so complex. - Help!

## RE: still seeing supressed values in sum

Sum(@qty)/Count(@qty)

Skip,

_{ Just traded in my OLD subtlety... for a NUance!}## RE: still seeing supressed values in sum

## RE: still seeing supressed values in sum

Skip,

_{ Just traded in my OLD subtlety... for a NUance!}## RE: still seeing supressed values in sum

I place this in a formula and place in the group header but it just divides the qty of the detail line it seems - doesn't sum anything.

## RE: still seeing supressed values in sum

:SkipPerhaps you could provide more details - I don't understand your approach but would be happy to help turn it into propper CR code.

tonyvee1973There are a couple of ways I can think of to do this.

I would need to see the formula {@f_qty} to be better able to recommend a solution but essentially one involves the use of a Running Total set to evaluate using a formula, where that formula is the suppression formula quoted in your original post enclosed in parenthesis and with NOT at the start (although the result would need to be in the group footer rather than group header).

A alternaive approach might be to use a string created by concatenating the 3 fields from your suppression formula, grouping on that field so as to create unique records (mover all fields from detail section to group header/footer) and using variables to sum the results of the additional group (again the result would need to be in the group footer rather than group header).

If there is a real need to have the group totals in the header rather than footer, you might need to use the second approach above, but in a sub report.

If you need further help to resolve this, please provide more detail about the report structure (grouping etc) and the code for {@f_qty}.

Cheers

Pete

## RE: still seeing supressed values in sum

## RE: still seeing supressed values in sum

The OP wants to see...

But apparently the SUM() he's getting 10 for A and 9 for B.

So what I'd do is either SUM(Qty,@Item).Count(ITEM,@Item): 10/2 = 5; 9/3 = 3. (ie Sum Qty for a specific Item/Count Item for a specific Item)

Skip,

_{ Just traded in my OLD subtlety... for a NUance!}## RE: still seeing supressed values in sum

Given the OP is going out of his way to identify STOCK_CODE, OD_ORDER_NUMBER and {@f_qty}, I'd guess it isn't that simple.

Perhaps the OP could clarify the situation.

Cheers

Pete## RE: still seeing supressed values in sum