Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compare pct columns and suppress where necessary

Status
Not open for further replies.

OT2

Technical User
Jan 14, 2005
54
US
Hello, im using CR11 and an ODBC connection into our OMS to put togther the following report:

ORDER1
Account TgtQty @TgtQty% ExecQty @ExecQty% @Diff
acctA 40 40% 40 40% False
acctB 40 40% 40 40% False
acctC 10 10% 10 40% False
acctD 10 10% 10 40% False

ORDER2
Account TgtQty @TgtQty% ExecQty @ExecQty% @Diff
acctA 40 40% 10 10% True
acctB 40 40% 40 40% False
acctC 10 10% 40 40% True
acctD 10 10% 10 10% False

Group1 is the order number, the account allocations are in the details section of the report.

@TgtQty% = TgtQty/OrderTgtQty
@ExecQty% = ExecQty/OrderExecQty
@Diff = (@TgtQty% = @ExecQty%)

I would like to suppress all orders (entire order) where there is no difference between the @TgtQty% and the @ExecQty% for all accounts (order 1 in my example above).

CR11 wont let me do a distinct count of @Diff or summarize that formula in any way. Any suggestions would be greatly appreciated.

Thank you
 
I think I had a similar problem.
thread767-1550644
Look at that for a start and see if you can get any ideas from it.
 
Hi DJ, I cant summarize @Diff formula, i guess its cause theres a calculation involved. Thanks for your help.
 
Instead of {@Diff} being a boolean, try this in {@Diff}:
if {@TgtQty%} = {@ExecQty%} then 0 else 1
then do a maximum of {@Diff} and put it in the GH with the order number then go to the Select Expert and Suppress formula and for the GH and Details sections do {@Diff} = 0.

That, I believe, will suppress any line where {@Diff} = 0. Problem is in your ORDER2. The formula will suppress your ORDER2 acctB and acctD since the {@Diff} = 0 but would leave your GH for that order number since the maximum would be 1.

That might work... or maybe at least get you closer to what you want.

-DJWW

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top