Solved

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

Posted on 2011-09-04
2
540 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:Chopp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 36482055
Try this

OddNumber

{CaseNumberField} Mod 2 = 1

EvenNumber

{CaseNumberField} Mod 2 = 0

MOD gives the remainder when divided by in this case 2

mlmcc

0
 

Author Closing Comment

by:Chopp
ID: 36482105
Thank you very much!  That works perfectly for my report.
Have a great evening.
~Chopp
0

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question