Crystal v10 - Create cents per gallon

Here is what I have:


One Invoice:
Product 97 - 1000 Gallons * 3.90/gallon
Product 87 - 2500 Gallons * 3.60/ Gallon
Toll - $20.00

What I need to do is The gallons together first - 3500 Gallons Total, Get the % of the Toll amount per Product - ( Product 97 = .29% and Product 87 = .71%) then Calculate the Cents per Gallon for each - ($20 * 29% = 5.80/1000 = .0058,  $20 * 71% = 14.20/2500 = .0041) Then I need to add the cents per unit to each product ( Product 97 = 3.90 +.0058 = 3.9058, Product 87 = 3.60 + 3.6041)  

Is there a way to do this?  

Thank you for your help!!!
Erin LealeConsultant/ControllerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
WHere do you get the math and formulas?

Is the toll based on gallons or a fixed toll?

It seems to me the toll per gallon should be $20.00 / 3500 gallons then applied equally across both products

14.20/2500  = 0.00568

WHat does this have to do with Crystal Reports?

mlmcc
0
Erin LealeConsultant/ControllerAuthor Commented:
WHere do you get the math and formulas?  
** The data is in a data base for Invoice History - I have Product/Gallons/Price excluding the Flat Toll Rate that is on a separate line

Is the toll based on gallons or a fixed toll?  
** Fixed Amount for this invoice - This amount can change but the Inventory Code in the database is /Tolls

It seems to me the toll per gallon should be $20.00 / 3500 gallons then applied equally across both products
** For the Fuel Products I  have to have the Exact cents per unit by the percentage of the gallons - this is how the customer is doing the pricing at the Stations.  This is for the COGS to calc correctly in their system.

14.20/2500  = 0.00568

WHat does this have to do with Crystal Reports?
**We are using Crystal to export the data to create an import into their other company.  We are trying to avoid custom programming for them and need a formula to add the Toll cents per unit to the price being imported.

Thank you.
0
mlmccCommented:
You need to define how the toll is to be spread between products and the equations.  The equations can then be used to create formulas in Crystal to add the toll per gallon.

You can just use this as the formula to get the cost per gallon.  
      {Toll Field} / {Total Gallons Field}

If you calculate using your formulas and keep the decimal places (don't round to 2) the answer is the same either way 0.005714

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Erin LealeConsultant/ControllerAuthor Commented:
Makes Sense - I was really over thinking that one.  

Thanks.
0
Erin LealeConsultant/ControllerAuthor Commented:
Thanks for your help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.