How to Identify the Value of a Database Field in Crystal Reports that is an Integer as Even or Odd Number?

Chopp
Chopp used Ask the Experts™
on
Hello Experts,

Is there a function or formula in Crystal Reports that can identify the value of a database field that is an integer, as an even or an odd number ?
My goal is to put all records with an odd 'case number' on the left side of my report and all the records with an even 'case number' on the right.  I am using two subreports to display the case number data in a group section.

Thank you.
~Chopp
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
Commented:
Try this

OddNumber

{CaseNumberField} Mod 2 = 1

EvenNumber

{CaseNumberField} Mod 2 = 0

MOD gives the remainder when divided by in this case 2

mlmcc

Author

Commented:
Thank you very much!  That works perfectly for my report.
Have a great evening.
~Chopp

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial