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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there an equivalent of "Select minus" in Crystal 9 ?

Status
Not open for further replies.

IslandLass

Technical User
Apr 30, 2013
5
GB
I have a report which contains groups of transactions for a customer within a time frame. There can be around 20 different transaction types for a customer. The group is considered for printing if there isn't a zero balance for the customer. But, if the group contains any one of 11 specific transaction types, then the whole customer group should NOT be printed. How can I do this in Crystal (I'm using Version 9)?
 
Create a formula

@test
If {your field in [ list of 11] then 1 else 0

Use group selection
maximum(@test, customergrpfield) = 1

Ian
 
Thank you for your advise. I can see what you're aiming at, but I'm afraid it didn't work. It still left the groups in the report which contain the transaction from the 'lists of 11 transaction types' that I don't want on the report.

My function is called @movement and is as follows:
if ({M_TABLE.TXN_ITEM_TYPE}in ['TXC', 'TXB', 'TBC', 'TCD', 'TAC', 'RCM', 'RMS', 'RMN', 'TXF', 'TXG', 'CRD'])
then 0 else 1

then in group selection
Maximum ( {@movement} , {MATTER.MATTER_CODE}) = 1

Is there anything else I should check?

 
Sorry got it the wrong way round, so your formula should give desired results. Did it not work?

Ian
 
Sorry, no it didn't work. It still left the groups in the report which contain transactions from the 'lists of 11 transaction types' that I don't want on the report. In fact the report looked like I hadn't added any code at all to it (though I assure you I did save it!). Is there anything else I should check?
 
Remove the group selection.

Create new formula
@movemax
Maximum ( {@movement} , {MATTER.MATTER_CODE})

Place the @movement formula in details, place m@movemax in group footer and see what is returned,

Is there a possibility that @movement can return Null, that might cause solution to fail

Ian
 
Thank you. There is a strong possibility that @movement will find groups that contain only transactions from the 'list of 11'. I'll try your suggestion when I'm next at work (I work part-time).
 
Hi Ian,

No luck with your last suggestion unfortunately so I reverted back to your first one as it really should have worked.

I 'reversed' the values in the function, i.e
@movement
if ({MATTER_TXN.TXN_ITEM_TYPE}in ['TXCC', 'TXCB', 'TXBC', 'TXCD', 'TXDC', 'RCM', 'RCMS', 'RCMN', 'TXCF', 'TXFC', 'CRID'])
then 1 else 0

then in group selection .... maximum( {@movement}, {MATTER.MATTER_CODE} ) = 0

This WORKS ! Thank you very much for your help.
Sue

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top