Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Grouping issue Post Reply Post New Topic
Author Message
Chrisp85
Newbie
Newbie


Joined: 12 Sep 2014
Online Status: Offline
Posts: 5
Quote Chrisp85 Replybullet Topic: Grouping issue
     Posted: 31 Dec 2014 at 3:42am
Hello,

I am currently using Crystal Reports 2013. I have an issue with grouping that is splitting up group b due to group a when I would like group b to remain together.

Example:

Group A: Want date
Group B: Work Order Number
Group C: Work Order Leg

My ultimate goal is to group each work order and sort by want date.

The issue: Since leg 0 contains the want date information in the workorder, all other legs within that workorder fall into a blank want date bucket.

Effect: Its causing workorder numbers to split. One shows with the leg 0 and the want date information and the other shows with the remaining legs and no want date info.

Hopeful solution: Somehow relate the non 0 legs to the 0 leg want date so all legs are grouped under 1 workorder number.

I apologize if this is not clear but hopefully we can work towards a solution.

Thank you,

Chris
IP IP Logged
adavis
Senior Member
Senior Member


Joined: 30 Oct 2012
Online Status: Offline
Posts: 104
Quote adavis Replybullet Posted: 31 Dec 2014 at 3:55am
Have you tried switching your grouping so that group A is work order number, group b is work order leg, and group c is want date?

I'm not sure what a "want date" or "work order leg" is, so it is hard to say if that reorganization would provide the desired result, but it sounds like you are getting your records split because some factor is true for 1 record under the other two parameters which is causing the record to appear more than once.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Dec 2014 at 4:00am

I agree with adavis.

To expand a little bit more you likley only need the one group (on work order #) then use a min or max function on the "want date" and sort the WO# group according to that result
IP IP Logged
Chrisp85
Newbie
Newbie


Joined: 12 Sep 2014
Online Status: Offline
Posts: 5
Quote Chrisp85 Replybullet Posted: 31 Dec 2014 at 4:06am
Thank you for the quick replies. I have attempted adavis advice. Im trying to test the results now.

DBlank, could you please elaborate a little further. I do consider myself a novice. Are you referring to the group sort by formula? If so, how would that formula look?

Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Dec 2014 at 4:45am

not by a formula but by a summary

if you insert a summary at the group level
example: minimum(table.wantdate,table.workordernum)
the group sort option will become available (blue upward graph line with a red arrow pointing up)
use it to sortĀ the group using the min or max value results for that groupĀ 
It also is used to select top N values of groups.
IP IP Logged
Chrisp85
Newbie
Newbie


Joined: 12 Sep 2014
Online Status: Offline
Posts: 5
Quote Chrisp85 Replybullet Posted: 31 Dec 2014 at 5:24am
EDIT: I had a higher level group that was overriding the sort. I've adjusted it. Your solution worked. Truly appreciated since I've been attempting a fix for over a week...

"I have the sort option set but something must be overriding the sort. No changes occur when I set to "all" base on "Max of WORK_ORDER.DESIRED_WANT_DATE". The screen blips as if it refreshed. Any ideas?"

Edited by Chrisp85 - 31 Dec 2014 at 5:29am
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum