Preventing a Never-Ending Loop

Google+ Pinterest LinkedIn Tumblr +

To prevent the possibility of an endless loop, any one evaluation of a formula can have no more than 30,000 loop evaluations. In die event that a formula goes through more than 30,000 loop evaluations, SCR presents an error mes­sage. If a single formula contains multiple loops, this safety mechanism applies to the entire formula and not to each individual loop.

Formula Limitations

As you develop formulas, you’ll want to be aware of certain size limitations Since the limitations are quite generous, you may never encounter them. Just in case, though, the following list recaps formula limitations.

•   The maximum number of loop condition evaluations per evaluation of

a formula is 30,000.

•   The maximum length of a string (constant, value held by a sting vari­able, value returned by a function, or string element of a string array) is 254 bytes.

•   The maximum size of an array is 1000 elements.

•   The maximum length of the text of a formula is 64K.

•   The maximum number of arguments to a function is 1000 (applied to functions that can have an indefinite number of arguments, like Choose).

•   Date time functions modeled on Visual Basic accept dates from year 100 to year 9999. Traditional Seagate Crystal Reports functions accept dates from year 1 to year 9999.

Programming Shortcuts

SCH. now has several programming shortcut functions that act like control structures. They arc different from control structures in that they can be used in selection formulas and pushed down to the server for processing.


About Author

Leave A Reply