Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Specifying grouping of a group Post Reply Post New Topic
Author Message
iancon
Newbie
Newbie
Avatar

Joined: 08 Jul 2010
Location: Zimbabwe
Online Status: Offline
Posts: 6
Quote iancon Replybullet Topic: Specifying grouping of a group
     Posted: 08 Jul 2010 at 8:56am
Hi, I've been racking my brains on this and can't figure it out. I'm doing a report that lists stock items issued to a job so have grouped by job number. I've got a formula that groups the stock items into category A, B and C, which is then another group. What I want the report to do is to list A & B category items together, so that rather that the groups will show "A&B" and then "C". Any ideas? Would so appreciate thoughts.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 08 Jul 2010 at 9:33am
"in specified order'.  You then can group A&B together.  Also 'in specified order', you may want to make the  'Others' as group C.
 
I hope this helps.
IP IP Logged
iancon
Newbie
Newbie
Avatar

Joined: 08 Jul 2010
Location: Zimbabwe
Online Status: Offline
Posts: 6
Quote iancon Replybullet Posted: 08 Jul 2010 at 10:16am
Thanks Kevlray. I have tried this but should have said in my post that if the job number includes A&B then they should be grouped together, otherwise separately. I wasn't clear on that in my post. This seems to complicate things as using a specified order doesn't allow for an OR.


Edited by iancon - 08 Jul 2010 at 11:03am
IP IP Logged
iancon
Newbie
Newbie
Avatar

Joined: 08 Jul 2010
Location: Zimbabwe
Online Status: Offline
Posts: 6
Quote iancon Replybullet Posted: 08 Jul 2010 at 10:37pm
I'm thinking i may need to use an array function that stores the various stock code groups and then i can analyse the array for it's content. Does that sound possible?
IP IP Logged
iancon
Newbie
Newbie
Avatar

Joined: 08 Jul 2010
Location: Zimbabwe
Online Status: Offline
Posts: 6
Quote iancon Replybullet Posted: 14 Jul 2010 at 3:42am
Ok, so what I've done is to set a formula that says if the group = A, B or C then value is 1 else 0. Then I can sum that formula and set the header depending on the value. But i can't summarise a formula that is set at group level. It just tells me that the field can't be summarised. Any ideas as to how i can do this? Thanks so much. Still battling with this!
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 14 Jul 2010 at 7:53am
Are you doing a count of items in the group.  If so, can you do a running total? 
IP IP Logged
iancon
Newbie
Newbie
Avatar

Joined: 08 Jul 2010
Location: Zimbabwe
Online Status: Offline
Posts: 6
Quote iancon Replybullet Posted: 14 Jul 2010 at 8:58pm
Count will work, as will sum. When I try do a running total the formula doesn't even appear as an option, i think because it is already summarised as a group. so it doesn't appear that i can do a running total.
IP IP Logged
Emir_W
Senior Member
Senior Member
Avatar

Joined: 25 Apr 2010
Online Status: Offline
Posts: 228
Quote Emir_W Replybullet Posted: 14 Jul 2010 at 9:35pm
i think you can create a formula which will compare the category.
something like:
if item_category="A" or item_category="B" then "A&B"
else "C"
 
and then make it as a group.
so, you'll get what you want where all items in Category A and B will be in one group (A&B) and the rest will be in C.
 
and from here you can get the sum for each group.
 
 
hope it help.
 
Emir W
IP IP Logged
iancon
Newbie
Newbie
Avatar

Joined: 08 Jul 2010
Location: Zimbabwe
Online Status: Offline
Posts: 6
Quote iancon Replybullet Posted: 14 Jul 2010 at 9:53pm
Thanks Emir. The trick is that A&B are only classified as A&B if both exist otherwise separately. By way of example:

JOB, group
1,a
1,b
2,a

would go to
1,a/b
2,a
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