Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Subreport Groups not Sorting correctly Post Reply Post New Topic
Author Message
MikeA57
Newbie
Newbie
Avatar

Joined: 30 Mar 2010
Online Status: Offline
Posts: 11
Quote MikeA57 Replybullet Topic: Subreport Groups not Sorting correctly
     Posted: 04 Nov 2014 at 11:15am
I have a report that has a main report and 2 subreports. The main report's one and only group is sorted by specified order. Each of the subreport's groups are sorted in ascending order. However, when the report runs, the subreports group headings are not in ascending order. I don't know what order they're in but it's not correct and I need to get it fixed. Is there some way of achieving this?

I am using Crystal XI (ver. 11.5.12.1838)

Thanks,

Mike
IP IP Logged
z9962
Senior Member
Senior Member
Avatar

Joined: 04 Jul 2012
Online Status: Offline
Posts: 161
Quote z9962 Replybullet Posted: 05 Nov 2014 at 12:36am
in the subreport, the Change Group options window, select the Options tab, do you have Customize Group Name Field ticked?
IP IP Logged
MikeA57
Newbie
Newbie
Avatar

Joined: 30 Mar 2010
Online Status: Offline
Posts: 11
Quote MikeA57 Replybullet Posted: 05 Nov 2014 at 6:03am
No. But it occurred to me that the field that I'm grouping on is a string and when I displayed the actual code (I was only showing the Description of it), it was indeed in Ascending order for a string.

But, if the codes are numeric, I need them to be in numeric order. The user has the ability to choose any of 40 different code groups some of which will be numeric and some that would be alpha numeric or straight alpha. So I thought about how I could test whether it is a numeric code or an alpha numeric one.

To do that, I created a formula that reads:

If NumericText({CrystalData.Group1})
Then
Val({CrystalData.Group1})
Else
{CrystalData.Group1}

When I test it though it errors on the last line saying "A number is required here." I need it to group no matter what the data type is.

Thanks!
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