C_BOCR_11 · Question #277
You create the following formula in a new Crystal report to return random records based on the user's parameter input: WhilePrintingRecords; NumberVar array Rnd_Array; Redim Rnd_Array[{?Records…
The correct answer is B. For Do. See the full explanation below for the reasoning.
Question
You create the following formula in a new Crystal report to return random records based on the user's parameter input:
WhilePrintingRecords; NumberVar array Rnd_Array; Redim Rnd_Array[{?Records Returned}]; NumberVar Seed; numbervar arryindex1; Numbervar arryindex2; While arryindex1 := 1 To {?Records Returned} Do( Seed := Int (Count ({Orders.Order ID})*RND()); if not(Seed in Rnd_Array) and arryindex2 < {?Records Returned} then ( arryindex2 := arryindex2 + 1; Rnd_Array[arryindex2] := Seed ) ); Rnd_Array[1]; You receive an error when saving the formula. Which loop type should you replace the existing loop with to resolve the error?
Options
- ADo While
- BFor Do
- CDo Until
- DFor Next
How the community answered
(21 responses)- A5% (1)
- B76% (16)
- C14% (3)
- D5% (1)
Community Discussion
No community discussion yet for this question.