Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Group Sorting with formula query Post Reply Post New Topic
Author Message
nlcdcg
Newbie
Newbie


Joined: 24 Nov 2011
Online Status: Offline
Posts: 10
Quote nlcdcg Replybullet Topic: Group Sorting with formula query
    Posted: 30 May 2012 at 1:00am
Hi,
Please can someone help me with the below.  I have a report where I'm sorting on the field TimeOpenSoFar (for open support calls).  This is a text field and the values are shown as 001,10:14:26 where 001 is days, 10 is hours, 14 is minutes and 26 is seconds.
 
I am trying to group in my report so that all calls 1 day or less are grouped together, all calls for 001 are grouped together, all calls for 002 are grouped together and so on.
 
I am using the following formula in Report > Group Expert > Options > Options Tab > Use a Formula as a group name > x+2
 
if "000" in ({calllog.timeopensofar}) then "Less than 24 hrs" else
if "001" in ({calllog.timeopensofar}) then "24 to 48 hours" else "Others"
 
This works fine except instead of giving me one heading with all the calls listed underneath like:
 
Less than 24 hrs
Callid1
Callid2
Callid3
 
It is giving me a heading for each entry:
 
Less than 24 hrs
callid1
 
Less than 24 hrs
callid2
 
Less than 24 hrs
callid3
 
Does anyone know how I can get just one heading with all the relevant calls listed under one heading?
 
Thanks in advance!
 
 
IP IP Logged
rkrowland
Senior Member
Senior Member
Avatar

Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Quote rkrowland Replybullet Posted: 30 May 2012 at 3:05am
Basically it's happening because they're still grouped by the original timeopensofar field.
 
Create a new formula called whatever you like containing your above group-name formula.
 
Now create your group on that formula instead of on the timeopensodar field.
 
Regards,
Ryan.
IP IP Logged
nlcdcg
Newbie
Newbie


Joined: 24 Nov 2011
Online Status: Offline
Posts: 10
Quote nlcdcg Replybullet Posted: 30 May 2012 at 5:21am
That works perfectly!  Thank you so much.
IP IP Logged
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.046 seconds.