Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Custom grouping in crystal report Post Reply Post New Topic
Author Message
rbarekere
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 7
Quote rbarekere Replybullet Topic: Custom grouping in crystal report
     Posted: 13 Apr 2009 at 3:21pm

I have a requirement of creating a report off BEx query (BI 7.0).

I have database field which gives around 250 rows. Now with these 250 rows I need to create a custom grouping in crystal report having 2 groups and a detail.
 
Some info about database field: For ex: 'A', 'B' and 'C' are 3 sample rows of the database field. I want to arrange this in such a way that.
A will form Group 1 and B will form group 2 and it is sub group of Group 1. and C is part of Group 2.
A (group 1)
B (Group 2)
C.
 
But when I tried it it resulted in
A (group 1)
Others
 
Others (group1)
B(Group 2)
C.
 
In this method I was successful in creating report if there were only 2 levels. But when it comes to 3rd level i am facing the problem. Any solution from experts.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 14 Apr 2009 at 6:22am
If you can modify the query, have it return an additional column that specifies the group it belongs to, then create the grouping in the report based on this new column.
 
Otherwise, you will need to create a formula that logically encompasses your data and groups them as needed, then you can create the grouping based on the formula (Brian in his book taught me this and it has been a Godsend...grouping off of a formula, what a concept!!)
IP IP Logged
rbarekere
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 7
Quote rbarekere Replybullet Posted: 14 Apr 2009 at 9:04am

Hi lockwelle,

Thanks for the suggestion.

I will try this.

Raghu
IP IP Logged
rbarekere
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 7
Quote rbarekere Replybullet Posted: 14 Apr 2009 at 9:20am
Hi,
 
I have on dbfield which returns the rows like this
A
a1
100
101
a2
200
201
B
b1
1100
 
Now I have created a group1 formula saying if dbfield in ["a1", "a2"] then A......
 
and group 2 formula saying dbfield = ["100", "101"] then a1.......
So I want the result like this
GH1 A
GH2 a1
D     100
D     101
 
But instead it gives me
GH1 A
D     a1
D     a2
GH1 B
D     b1
 
GH2 a1
D      100
D      101
etc..
 
Thanks
Raghu
 
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