This is a general programming question. I'm actually using it in Crystal Reports, but it's just the logic that I need.

I want to say if the pagenumber is odd-numbered then do X, if it's even-numbered then do Y. I just can't find a good mathematical way of figuring that out.

For example, if [pagenumber] is divisible by 2, then it's even. And if [pagenumber] is NOT divisible by 2, then it's odd. But that doesn't really work. Anyway, there must be a simple way of doing this. Maybe using the '%' operator??

Thank you for your help!!
Andrea