Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regarding Random Selection

Status
Not open for further replies.

cazellnu

Technical User
Aug 15, 2002
41
CA
I am currently using Version 7 or Crystal Report and I would like to pull out given number of randomly selected within the table randomly. I don't see I am able to use Rnd() function in my crystal report and I am wonder would there be any alternative approach. Any suggestion would be helpful. Thank you

 
If RND() isn't available, then your database might support some sort of random function so that you might return some value with the data set.

Other kludges are to base it on some values in one or more of the fields, such as:

val(left(totext({table.value},0,""),2))
+
asc(left({table.textfield},1))

It's really impossible to get a truly random number, but you might build something that will suffice for your purposes by using the exisiting data.

-k
 
You could try using the seconds or hundredths of seconds, if your Crystal will let you see them.

Madawc Williams
East Anglia, Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top