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!

Creating a special group

Status
Not open for further replies.

indupriya9

Programmer
Oct 29, 2002
99
NZ
Hi there

I have to create special groups based on the employee names and report the data in the report based on these special groups.

Therefore, I have created the groups as follows in one formula field named "team" and grouped the report based on this field "team". But for some reason, the summary fields are not changing based on the new groups. The summary fields are having the value of the last name of the team.

My formula in the teams formula field is:

if {Employee.last name} ="Doe" or {Employee.last name} ="Doug" or {Employee.last name} ="Drunk" then "Group D"
else if {Employee.last name} ="Joe" or {Employee.last name} ="Jones" then "Group J"
else "Other"

My problem is the summary values of the report are not adding up to reflect the grouped values. Can anyone there help me solve this problem please.

Thanks in advance
 
Since you're just using the first initial, try a formula to group by like:

uppercase(left({Employee.last name},1)

As for your summary values, one would haave to know where these summaries are and how they were created to help.

Add to that the version of Crystal and database used, and we'd start to have some meaningful technical information upon which to base assistance.

Place the {Employee.last name} field in the details, right click it and select insert summary count to get the count.

perhaps you're returning duplicates, in which case Database->Select Distinct Records might help.

Otherwise post where these summaries exist, how they were created, and what they're supposed to return (don't bother showing what they shouldn't return).

-k
 
Check your summary field and I think you will find you are showing a 'maximum' summary rather than a 'count' summary.

Right click on the summary field in the report and choose 'change summary operation' to alter this

Steve Phillips, Crystal Trainer/Consultant
 
Thanks for your responses. The problem here is when I use the same formula in another report it worked perfectly as there is only one table in that report.

Now in the current report, I am using 4 tables (target details, targets, targets by account manager and employee tables) and the summary fields are the targets and actuals which are in the target details table. When I use the group by last name then it gives the individual summaries by last name. What I have to achieve is the when i group with the formula field (this formula field contains some groups of employees into teams), then the summary fields must add up to reflect the team total. I hope I am clear with my problem.
I am using crystal ver 8.5

Thanks
 
What you're probably experiencing is that your detail level has more rows than the aggregate that you're trying to display.

In Crystal 8.5 you can select a distinct count of any field, which might resolve this.

You can also use the 3 formula method to sum/countperform aggregates on any field at any level, so you can count/sum at a group level.

Otherwise there's too little to go on here.

Post a real world example of the data and expected output and everything should be clear.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top