Crystal Reports for Eclipse Designer Guide

Rnd

Description
Rnd returns a random number greater than or equal to 0 and less than 1.
Overloads
  • Rnd ()
  • Rnd (seed)
  • Arguments
  • seed is an optional Number value argument.
  • Returns
    A Number value.
    Action
    Rnd returns a random number greater than or equal to 0 and less than 1. If seed is equal to 0, Rnd returns the random number that was returned from the previous call to Rnd. If seed is not supplied or is greater than 0, then Rnd returns the next random number in the internally generated sequence of random numbers. If seed is less than 0, then Rnd uses this value of seed to start a new random number sequence and returns the first value in this sequence.
    Typical uses
    Used when your formula requires a randomly generated number such as for statistical calculations or for selecting records at random to limit the data in a report.
    Comments
  • You can call Rnd without ever starting a new random number sequence by specifying a negative seed argument. If you do so, an internal seed will be generated using the system clock.
  • The reason to start a new random number sequence by calling Rnd with a negative seed argument, and then making subsequent calls to Rnd without an argument (or with a positive argument) is so that the report will look exactly the same every time it is previewed. In other words, it allows you to make use of random numbers, but get a reproducible result.



  • SAP BusinessObjects
    http://www.sap.com/sapbusinessobjects/
    Support services
    http://service.sap.com/bosap-support/
    Product Documentation on the Web
    http://help.sap.com/