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
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
487 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
2 Comments
 
LVL 100

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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 …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

789 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