tonyvee1973
IS-IT--Management
Hi ALl
Been on this for a day or so now and going around in circles so hope someone can advise?
I have a report where in the detail line I have a formula named "@f_qty" - this holds a formula as below:
if {SL_TRANSACTIONS.ST_TRANTYPE} = 'CRN'
then {ORD_DETAIL.OD_QTYINVD}*-1
else {ORD_DETAIL.OD_QTYINVD}
This returns me values for qty of product sold, however on some of those detail lines there are duplicates.
Not really straight forward as some duplicates are allowed as we sometimes have multiple lines on an order with the same stock code and qty - we would want to return these values.
However, there are some records which are full duplicates that need to be suppressed. These are records which duplicate stock code, qty and location.
The formula below is in section expert within details and suppresses these records ok:
{ORD_DETAIL.OD_STOCK_CODE} = Next({ORD_DETAIL.OD_STOCK_CODE}) And
{ORD_DETAIL.OD_ORDER_NUMBER} = Next({ORD_DETAIL.OD_ORDER_NUMBER}) And
{ORD_DETAIL.OD_LOCATN} = Next ({ORD_DETAIL.OD_LOCATN}) And
{@f_qty} = Next({@f_qty})
Now on to my issue which im sure is a simple one to some but driving me crazy.
I have inserted a summary for the "@f_qty" field but it sums all values even the suppressed ones. I've tried lots of stuff inc running totals etc but just keep making a mess of it, can someone help please?
attachment shows the incorrect sum.
Been on this for a day or so now and going around in circles so hope someone can advise?
I have a report where in the detail line I have a formula named "@f_qty" - this holds a formula as below:
if {SL_TRANSACTIONS.ST_TRANTYPE} = 'CRN'
then {ORD_DETAIL.OD_QTYINVD}*-1
else {ORD_DETAIL.OD_QTYINVD}
This returns me values for qty of product sold, however on some of those detail lines there are duplicates.
Not really straight forward as some duplicates are allowed as we sometimes have multiple lines on an order with the same stock code and qty - we would want to return these values.
However, there are some records which are full duplicates that need to be suppressed. These are records which duplicate stock code, qty and location.
The formula below is in section expert within details and suppresses these records ok:
{ORD_DETAIL.OD_STOCK_CODE} = Next({ORD_DETAIL.OD_STOCK_CODE}) And
{ORD_DETAIL.OD_ORDER_NUMBER} = Next({ORD_DETAIL.OD_ORDER_NUMBER}) And
{ORD_DETAIL.OD_LOCATN} = Next ({ORD_DETAIL.OD_LOCATN}) And
{@f_qty} = Next({@f_qty})
Now on to my issue which im sure is a simple one to some but driving me crazy.
I have inserted a summary for the "@f_qty" field but it sums all values even the suppressed ones. I've tried lots of stuff inc running totals etc but just keep making a mess of it, can someone help please?
attachment shows the incorrect sum.