I'm trying to have crystal reports run through a Select statement however I keeps on dropping out after hitting the first match instead of continuing on through each case. How can I get it to evaluate each condition on it's own merits instead of it automaticaly breaking after finding the first match?
Example
local numbervar varNumber := 0;
Select 7
case is <= 1:
varNumber := varNumber + 1 //Only gets to here
case is <= 2:
varNumber := varNumber + 1
case is <= 3:
varNumber := varNumber + 1
case is <= 4:
varNumber := varNumber + 1
case is <= 5:
varNumber := varNumber + 1
case is <= 6:
varNumber := varNumber + 1
case is <= 7:
varNumber := varNumber + 1
End Select
varNumber value should be 7 by the end of the select statement as each condition should have evaluated true, however it stops after hitting the first case, resulting in varNumber being 1, normally you would have a break statement to tell it to stop falling through each case statement, but this isn't happening.
Alternatively is there a way to simulate this functionality?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…