Guy,

I moved the thread to the Windows application sub-forum as it has nothing to do with DataFlex Reports.

PS: Next to what Sture says about local variables the use of EQ (or NE, GE, GT, LE, LT) in expressions is not as we like to see the code. About 30 years back it was added to make the transition from commands with parameters to expressions easier but we should have not done this as it makes it harder to understand the code for newbies, people pickup code from others.