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

Add two Report values from calculation 1

Status
Not open for further replies.

olgas74

Technical User
Feb 18, 2003
8
0
0
US
I need to be able to sum the values of two calculations on a report I have created. Here is the scenario:

I have a report which is a packing slip used for product shipping. The report is grouped by customer and product group. Within the product group I have calculated subtotals on piece and weight counts. The piece count is based on a calculation which states that for every 38 lbs a new box is created. Once that has been calculated I then need to determine the weight of the physical packaging. (In this case each carton weighs 1.85 lbs.)This is done by multiplying the number of cartons times the 1.85. The weight calculation is the physical weight of the product times the number units ordered. Finally I need to add the weight of the physical product and the weight of the shipping cartons. Unfortunately, because these are calculations and the values are not stored I am unable to do so. Please let me know if you have any suggestions. I was thinking of possibly doing an initial calculation in my query but I'm not sure how to complete this.
 
There is a special forum for reports. Better to put it there...

For now, this looks it can be done in one query, but I might be wrong:

WeightOrder = WheightProduct * ProductQuant
PieceCount = RoundUp(WeightOrder/3.8)
WeightPackiging = PieceCount * 1.85
WeightTotal = WeightPackiging + WeightOrder

Pampers [afro]
Keeping it simple can be very difficult
 
I was able to duplicate your query however there is one issue that I can't overcome. Within my table I have records that need to be grouped together before the packaging weight is calculated. For example, the first customer has ordered 4 items, two of those items need to be packaged together in the same carton an then two in the other. Those splits are being identified by a Product_Group field. Using the calculation you had suggested, the packaging weight is doubled because the query calculates packaging weight for each product even though they are being combined in one box. With that having been said I need to be able to sum the quantity of the product group first then perform the piece count and then the packaging weight.
 
mmmhh, lets try again

Example:
OrderQuant = 5 items
WeightItem = 1.5 lbs
WeightOrder = 7.5 lbs

ItemsPack=RoundDown(3.8/1.5)=2 (number of items in pack)
PieceCount=RoundUp(OrderQuant/ItemsPack)=5/2 = 3 pieces of packiging
weightpacking = 3 * 1.85 = 5.55 lbs
totalweight = 7.5 + 5.55 (total weight of the order)
2 packs holds 2 items
1 pack holds 1 item

How ProductGroup is used and how its splits things up, is something I can not determine on the information given.



Pampers [afro]
Keeping it simple can be very difficult
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top