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!

Group Sort Expert functionality via parameter selection

Status
Not open for further replies.

djeddie

IS-IT--Management
Jun 1, 2003
38
AU
Hi All,

I am using crystal 9 with an ODBC database. I have created a report which displayes our call centres staff statistics. These stats are in Group 2. Group 1 is the supervisors name. I have recently discovered that i am able to sort the results in group 2 by using the Report>Group Sort Expert function. Am i able to do the 'Group Sort Expert' based on a parameter selection?

I have looked through the forum and tried the various method but i have been unsuccessful. I think the ones i have read are for sorting results that are in the 'details' row (which i dont use in my report. My details are in Group 2 where you find the summaries per staff member.

Thankyou in advance for your time and help!!

Regards,

Eddie S
 
you could create formula fields and then based on the parameter set them to a table field or blank.

eg
if @ParamSorting = 1 then
{table.field1}
else
''

then set all your sorting options on each formula field.

depending on the parameter one of the formula field will have value the others wil be blank. making only one grouping effective

you can have different field type for each formula or you can use the same field with different sorting option.

The sorting is hierarchical and works at all level of groups

Mo
 
To use a parameter with the group sorting function, you would create a formula like {@sort}:

if {?sort} = "Amount" then {table.amount} else
if {?sort} = "Quantity" then {table.qty} else 0

Then place this formula in the detail section and insert a summary on it. You can then choose "sum of {@sort}" as a group sort field. If you want to be able to sort by different datatypes or by different types of summaries, then create separate formulas per datatype or summary and add all of them to the group sort. For each formula, you would use a default like 0 or "", so that if not containing a selected parameter, the formula will default to 0 or "" and not affect the group sort.

-LB
 
Thanx for your help but i dont think your solutions aply to me. The figures that i want to sort on are in groups. My details row is blank and hidden, i dont use it.

I have created the following formula:

if {?sort} = "CallsAnswered"
then {dAgentPerformanceStat.CallsAnswered}
else if {?sort} = "LoggedKPI"
then {@LoggedKPIAll}
else if {?sort} = "OBCallsMade"
then {@Outbound%All}

I have created a string parameter called ?sort and entered 3 discrete values: CallsAnswered, LoggedKPI and OBCallsMade.

When i go to Report>Group Sort Expert, i select "For this group" = All, and then when i go to "based on" it doesnt show me the formula or parameter that i created.

Please advise if i am doing anything wrong.

Cheers,

Eddie S
 
You must have an inserted summary in order to use the group sort function. If your figures in fields like{dAgentPerformanceStat.CallsAnswered} are already summarized figures, then place the formula I suggested above in the detail section and insert a maximum on it.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top