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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

random record generator for multiple individuals

Status
Not open for further replies.

rickxx

Technical User
Nov 21, 2007
14
US
Greetings. I have a database that collects new assignments for the month for 20 individuals. I want to create a report that generates, let's say 10 random records for each individual. I've got the part where you add rnd() to the detail section in ascending order and using the suppress recordnumber function in the details seciton expert but that only gives me 10 random records for the first person. how do i loop this process for the next 19 people.
thanks

rick
crystal 9.0
 
What is the backend database (SQL Server, Oracle, etc.)?

This would be easier as a command object, so the database does all the work and CR just displays the results.


 
Insert a group on the individual, and then also create a running total {#rt} that does a count of a recurring record, evaluates for each record and resets on change of group. Then add the rnd() formula to the detail section, sort on the formula, and then in the section expert->detail use:

{#rt} > 10

-LB
 
Sorry for the delay in responding. I was abducted by aliens. Thanks for the replies. It's time to rerun this report so let me give it a try.
 
LB, you're a genius! Thank you!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top