Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

finding orders who ordered in odd/even numbers 1

Status
Not open for further replies.

shricky

Programmer
Mar 6, 2007
17
US
How would I write a formula to show me a count of orders that were ordered in our minimum or multiples of the minimum? For example, if we require you to order a minimum of 2 of a Frame are our customers ordering 2,4,6,8 or are they ordering 2,3,4,5(b/c they only have to order the minimum and not multiples)?
 
Show some examples of your file if possible. What version of Crystal.

If the individual records have a field for number_rdered for each order you could use:
if number_ordered/minimum_order = 0
then 1
else 0

sum that new field up by the grouping used or the grand total if no grouping is used and that should give you every order that met the minimum or a multiple of.
if you wanted another to count the number of times the exact minimum was ordered use

if number_ordered = minimum_order
then 1
else 0



_____________________________________
Not the brightest
Crystal Reports XI Developer Version
user in the world........
 
I think you could use a formula like this:

numbervar x := 2; //set the minimum here
if remainder({table.orderqty},x)= 0 then
1

Then you could insert a sum on this formula to get the number of orders meeting your criterion.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top