Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Grouping problem Post Reply Post New Topic
Page  of 3 Next >>
Author Message
jjthed
Newbie
Newbie


Joined: 15 Aug 2014
Online Status: Offline
Posts: 20
Quote jjthed Replybullet Topic: Grouping problem
    Posted: 25 Aug 2014 at 2:21pm
Hello,

I've working on this report for few days and I am still stuck on this grouping problem that I have and I really would hope somebody can help me solve this problem.

My questions is, how can I design my report so that there are two big sections, the first section has 2 groups that are all about face items and any items other than face item would go to other section.  it looks something like below:

Face - Oil type
 
item               qty   unit price
eyeliner           5         $10
lip stick            4         $4
Total                9         $14

powder            2         $10
cream              2          $30
Total                3          $40

Face - dry type
item               qty   unit price
eyeliner           3         $10
lip stick            2         $4
Total                5         $14

powder            1         $10
cream              5          $30
Total                6          $40
 
other (the rest items that are not facial products)
item               qty   unit price
hand cream     1           $5
Shampoo         2           $6
Total                3           $11

Please advise how to make two big sections and the first section contain groups and the section section is the rest items. 

Thanks!

IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 25 Aug 2014 at 3:11pm
formula for group like
if not( item in[ "Face - Oil type","Face - dry type"]) then "other" else
item
IP IP Logged
jjthed
Newbie
Newbie


Joined: 15 Aug 2014
Online Status: Offline
Posts: 20
Quote jjthed Replybullet Posted: 26 Aug 2014 at 7:21am
Thanks, but where do I put that formula? Sorry I am very new here...
IP IP Logged
kostya1122
Senior Member
Senior Member
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Quote kostya1122 Replybullet Posted: 26 Aug 2014 at 8:10am
you group on this formula instead of you current group
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Aug 2014 at 8:11am
in the field explorer you create a formula field and use kostya's code.
Then in the grouping you select this formula field as teh field to group on.
 
EDIT: Sorry kostya - responding at the same time Smile


Edited by DBlank - 26 Aug 2014 at 8:11am
IP IP Logged
jjthed
Newbie
Newbie


Joined: 15 Aug 2014
Online Status: Offline
Posts: 20
Quote jjthed Replybullet Posted: 26 Aug 2014 at 8:13am
Thank you both so much. I will try that now and update :)
IP IP Logged
jjthed
Newbie
Newbie


Joined: 15 Aug 2014
Online Status: Offline
Posts: 20
Quote jjthed Replybullet Posted: 27 Aug 2014 at 5:03am
Thanks! I finally got the layout I wanted. How can I do totals within each section? And Where should the calculation go? Thanks! Below is the sample:

Face - Oil type

item              qty   unit price
eyeliner           5        $10
lip stick           4        $4
Total              9        $14

powder             1        $10
cream              2        $20
Total               3        $30
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Aug 2014 at 5:06am
assuming you do not have duplicate data...
just do a SUM of the QTY field and place it in the GF and repeat for the unit price field
IP IP Logged
jjthed
Newbie
Newbie


Joined: 15 Aug 2014
Online Status: Offline
Posts: 20
Quote jjthed Replybullet Posted: 27 Aug 2014 at 6:45am
Thanks DBlank. But what I mean is how do I break the item into two separate sections and do a total per each section? ie: for Face-oil type group has two sections, and I need to total each section.

Thanks!!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Aug 2014 at 7:11am
how are you determining waht items appear in each "sub-grouping"? Is it based on another field value?
If so you can group on that field, hide the GH and do you sum on that group footer.
If you don't have the value you can make the value like you did with the oher group header.
You can also use Running Totals or Shared Variable formulas and some suppression techniques on a details B but I would try to avoid that.
 
IP IP Logged
Page  of 3 Next >>
Post Reply Post New Topic
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



This page was generated in 0.047 seconds.