thanks...it appears that your group by has aggregation levels that are more granular than the order # but your requirement is to filter orders that have only one unit sold. this means that the total of NUM_SALES will be on the lowest group level and hence your filter in the report will not work as you want.
option 1:
so that you don't undo the existing group levels that you already have in your command, what you may to do is to add a subquery that returns the num sales at the order # level...add the following to the end of your select statement...there may be errors as I don't have your db to test against...note though that I've aliased the tables in the subquery using _TWO except in the case of the last line in the WHERE clause.
(SELECT SUM("OEIND94_TWO"."IDSHP#")
FROM "SN4M"."ASTDTA"."OEIND94" "OEIND94_TWO"
INNER JOIN "S1047N4M"."ASTDTA"."ICPRT1" "ICPRT1_TWO" ON
"OEIND94_TWO"."IDPRT#"="ICPRT1_TWO"."IAPRT#"
WHERE "OEIND94_TWO"."IDCOM#"='001' AND
"OEIND94_TWO"."IDDOCD" >= {?FromDate} AND
"OEIND94_TWO"."IDDOCD" <= {?ToDate} AND
"ICPRT1_TWO"."IARCC4"='FIN' AND
"OEIND94"."IDORD#" = "OEIND94_TWO"."IDORD#"
) AS NUM_UNITS_BY_ORDER_NUM
option 2:
don't rewrite your command but use a Group Selection filter in your report instead. insert a Summary on the num units field and have this a group level summary. then go to your group selection formula and use this new group level summary in that filter. do not use a Record Selection Filter in this case.
the group selection filter would look something like
sum({your NUM_UNITS field}, {your order # field}) = 1