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!

running totals and sums 1

Status
Not open for further replies.

kieso

Technical User
Jan 29, 2003
45
0
0
US
I'm sure I'm missing something obvious, by I'm a little tired this morning, so help me out ok?

I have a database of order items we didn't ship. Each one has number of items ordered, not shipped, and the remaining inventory at the end of the night. From these figures I've created a running total

each of my detail lines will show the following
O-not-S OH Ops
pringles 2 5 3
pringles 1 5 2
pringles 3 5 -1
pringles 1 5 -2

I want my my group footer to show that operations should have shipped the 5 items that were instock (they're responsible for those items that we had in stock.

Group footer should show
pringles 7 5 5
pretzles 4 61 4
This gets complicated by the fact that I need to show three other group fields

snacks 60 45
food 300 213
all depts 1000 645

I can compare the running total and the on hand number in an "if then else" to get figure out what could have been shipped in each detail line, and then compare total on hand to total shipped in each Group footer by item number, but how do I get those totals into broader Groups? do I need sub-reports, or is there an easier way that I'm missing?

Thanks guys :eek:)

Rodger
 
More thoughts

What if I go into the mainframe, and create another file in which each item number is represented by a record instead of each customer. If I put that figure in a group heading, can I total it in broader group headings??

Rodger
 
If you are trying to sum formulas that rely on running total fields, then you need to create formula based running totals using variables and accumulate the values. See faq149-182. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
My suggestion would be to lean toward Variables as mentioned by Ken. Depending on your version of Crystal, remember your variable's scope - (Global and Shared) and usage of WhilePrintingRecords in your formulas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top