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

Help with a formula for selecting anamolies in data

Status
Not open for further replies.

cinbh

MIS
Apr 16, 2002
58
US
I have a situation where I need to select orders where they have more than one license designation on an order and order detail level. The rub is if they have more than 1 I need to show all of the detail level records.
Data:
Customer, Order number, License
Bill 24000 PD
Jane 19200 PD
19200 SP
Joe 24001 FO
23001 FO
19455 PD
Stu 34000 FO
85999 FO
75600 FO
So from the example above I would need to see all of Jane and Joes orders as they have more than 1 license per order (at detail level). NOTE: Jane's has 2 different license on detail level versus Joe who (while also at detail level) the each orders details have a different license. I assume I need to save the license value that first comes in for a customer to check for the differences on the rows of data. My data is grouped by customer, shipweek, order number, license. We are using Crys 8.5 on VFP 8.o
Thanks, Cindy
 
Could you use a Top N sort on the license group where N is > 2?
 
Well, I am printing my data in the license grouping, but the Top N Sort is greyed out. Not exactly sure why? In the other reports I have it's not.
 
You can accomplish the desired display by going to report->edit selection formula->GROUP and entering:

distinctcount({table.license},{table.customer}) > 1

//where {table.customer} is your customer group field.

Once you have done this, you will need to use running totals for calculations you want only on the displayed fields, since non-group selected data will contribute to the more usual summaries.

-LB
 
Thank you LBass that was the ticket. I had tried originally using the group record select and was getting a summary total error, but I'm sure I had set up something incorrectly, probably the wrong grouping. NOW WORKS!!!
Cin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top