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

Create a random number within Crystal Reports version 8.5

Status
Not open for further replies.

DataOne

Programmer
Jan 12, 2011
10
US
Hello;
Can someone help me?
I need to create a random number within Crystal Reports version 8.5
 
Rnd() created a random number between zero and 1. Multiply it by say 100, and use the int() function to turn it into an integer. Multiply it by a larger number if desired.

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
To add to that, you can create a new formula {@random}:

rnd()

Add this to your detail section, and then use it as your sort field. You can then suppress (for example) all but the first record and you will have a randomly selected record.

Each time you refresh though, the formula will change and a different record will appear.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top