Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: How to use rnd function in crystal reports Post Reply Post New Topic
Author Message
reacha
Newbie
Newbie


Joined: 02 Nov 2010
Location: United States
Online Status: Offline
Posts: 7
Quote reacha Replybullet Topic: How to use rnd function in crystal reports
     Posted: 16 Dec 2010 at 9:18am
I have a report in which first i have grouped by supervisorname,username,auditdate,pkgid
Now i need to get only 2 pkgid's for each username that can be on same date or different date

For Ex:

Supervisor  Username   Auditstamp    pkgid
--------------  -------------  ---------------   -------
TOM          Peter           11/30/2010   10000
                                    11/31/2010   10001
                                    12/05/2010   10005

Adam         james         12/01/2010   10010
                                                          10012
                                     12/05/2010   10014

Output should be
----------------

Supervisor  Username   Auditstamp    pkgid
--------------  -------------  ---------------   --------
TOM          Peter           11/30/2010   10000
                                    11/31/2010   10001

Adam         james         12/01/2010   10010
                                    12/05/2010   10014
 
 
I need to get random number for each user whenever i run the report


Thanks,
reacha
Thanks,
reacha
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 20 Dec 2010 at 3:26am
well, to get 2 records you can use the Top N selection.  I have never used it, but it is available.
 
how do you want to use the random number?  is it to replace the user name? to link data together?
 
can you give an example of what you want if for?
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