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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding partial quantities 1

Status
Not open for further replies.

Kakoivini

Programmer
Dec 2, 2004
15
US
Greetings all,

CR9, Informix Procedure, Unix database.

I am trying to get my report to take the total quantity for a product and divide by the whole pallet quantity and then print an asterisk if it there is a partial pallet for that product. Basically if total qty / by whole pallet = less than whole number print asterisk.

Thanks!

 
Group on {table.product}. Then create a formula:

totext(sum({table.qty},{table.product})) + (if sum({table.qty},{table.product})/{table.wholepallet} < 1 then "*" else "")

If you mean you want an asterisk if the result of the division is not a whole number, but might be greater than 1, e.g., 2.3, then instead use:

totext(sum({table.qty},{table.product})) + (if remainder(sum({table.qty},{table.product}),{table.wholepallet}) <> 0 then "*" else "")

-LB
 
Cool thanks! That did the trick-I had to add a suppression statement so it would only print the asterisk. I am happy!!!
 
If you just want the * then eliminate the first part of the formula--up through the plus sign.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top