Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Need to return 2 rows per user Post Reply Post New Topic
Author Message
Turbert
Newbie
Newbie


Joined: 01 Oct 2007
Location: United States
Online Status: Offline
Posts: 2
Quote Turbert Replybullet Topic: Need to return 2 rows per user
    Posted: 01 Oct 2007 at 8:42am
Crystal 10

I have a report that pulls all 36 users from support.  This particular report however needs to return only 2 rows of call records per user.  In total, if there are 36 users on the report, I am looking to have a total of 72 call records.  I cant seem to make this happen.  Any ideas?

- Turbert


Edited by Turbert - 01 Oct 2007 at 8:43am
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 01 Oct 2007 at 9:52am
Hmmm... I came across this problem a while back but never worked on it. The idea I had to try was to do a Top N report but use it with groups to get the TOP 2 for each group id. I don't know if CR can do this or not and I haven't tried it myself yet. Another idea is to use a SQL Command object. I'll see if I can find the SQL in my reference books here.... But in the meantime, try a Top N report (maybe use it as a subreport with a link to the main report's ID field)? Let us know if you try that and how it goes.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Turbert
Newbie
Newbie


Joined: 01 Oct 2007
Location: United States
Online Status: Offline
Posts: 2
Quote Turbert Replybullet Posted: 01 Oct 2007 at 12:01pm
Thanks for your response Brian.  I tried creating a sub-report, but no avail.  I also tried creating an N report using Count on employee.full_name then sorting Top N where N = 2, but seems to strip away users still keeping full rows queried from orig params.  I think I need to find a formula to do it, just stuck in the mud at the moment.  Any other sugg most appreciated!

- Dan
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.031 seconds.