I'm assuming that "you can't do any math on these fields" means your attempts at computing an answer aren't producing the expected results.
There's a function you should learn about: GetSummary(Summary field; break field )
GetSummary(TotalConsumable; ItemNameField) + GetSummary (MaxResusable; ItemNameField)
Will compute subtotal results that you can place on a SubSummary report part in a layout to show the combined result for each material in your found set of records, provided you sort the records by the ItemNameField.
This GetSummary you speak of... is it in the script or someplace else?
I guess I mean where in the process can I access this command?
Define a field of type calculation and enter the expression.
Manage | Database | Fields
Enter field name, select calculation as its field type, click create.
Now enter the calculation expression in the specify calculation dialog that has opened.
Here is what I have. It is a subsummary report with no Body part.
R means reusable
C means Consumable (As you can plainly figure out
It has 2 subsummary parts. One summarizes things per Type of material and then it summarizes by name of material.
At the end, there's a total of prices. Ignore the light grey numbers on the right, those are material IDs I needed them for proofing stuff.
Also, I don't really have very good controlover the prices. They decide what they multiply by themselves (kind of)
I see your post and your screen shot, but exactly what is the problem at this point? What isn't working for you?
I need to add R and C together and use that field to multiply by the price of an individual material
And when I do what you said, I can'd seem to get anything showing in the field. It is just to the right of the price.
And I've described how to do that, where do you encounter trouble setting up the calculation field I describe? (you can multiply it by your item price to get the total cost.)
At first glance it seems like this is already working for you . I see your first line shows 10 150ml beakers 10 * 2.75 = 27.50 --which is the price shown. I used to teach chemistry and that total seems about right for a beaker of that size.
One more question: How are you sorting the items? They don't appear to be in alphabetical order like I would expect for a subsummary part of this type.
That is another little issue, It is sorted by the Material ID number and I'm having a problem fixing it. But that is for later.
The problem is when you scroll down to the Test Tubes, price of 1 is 80 cents and theoretically, it should show me 16.00 but it shows me 3.20 because it multiplies it by 4 in a lab which only needs 4.
Alright, I'm at work and it is quitting time. I will pick this back up at home.
Which means you're not referencing your summary field in your calculation. Here's the same expression, updated to better match your latest info and including the math to compute the total cost:
( GetSummary(TotalConsumable; materialIDField) + GetSummary (MaxResusable; MaterialIDField) ) * UnitCostField
TotalConsumable and MaxResuable are my names for your "R" and "C" summary fields.
You know what, it works now. I just had to make a new field instead of changing the existing one.
You rock as always.