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!

Using summary function with nested groups

Status
Not open for further replies.

hwwolfman

Programmer
May 6, 2003
2
US
I have a report developed with Crystal Reports 8.5 that shows histograms for various machine attributes. The data is grouped below the charts by values and machine names in that order.

I am trying to use the PthPercentile function as a selection criteria to knock out the top and bottom 5% as an error margin for the histogram. In the selection formula I am using this format:
{Machine.Cost} > PthPercentile(5,{Machine.Cost})

I am getting the error "The summary / running total field could not be created". I have tried using both group fields separately in the equation with no luck. Any thoughts?
 
You need to use this function in the group select, not the record select. Also, is it your intent to "knock out" the top and bottom 5% of all records? Or of records within groups? Your current formula (which I think you only displayed in part) would limit record selection to those greater than the bottom 5% of all records, if you used it in the group select statement. For a group select that creates a range within a group, do something like this:

Let's say you have a group on a field {Machine.Name}. Then

{Machine.Cost} > PthPercentile(5,{Machine.Cost},{Machine.Name}) or {Machine.Cost} < PthPercentile (95,{Machine.Cost},{Machine.Name})

should give you the middle 90% range of machine cost by machine name.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top