The basic set up you have here looks very similar to the "inventory Ledger" approach to inventory managment that I have recommended to many different folks here in the forum.
You only need a summary field to compute the total fo c_blance. You may want two, one set up for use as a running balance in a "ledger view" of your data so that you can see quantities on hand rise and fall. (Often noting that a running balance for a given product approaches zero repeatedly is an important indicator that you need to increase your re-order point in order to insure that you don't run out of product and be unable to fill an order.)
Define sTotal as a summary field that comptues the total of c_blance for your report.
Set up a list view layout with sub summary layout parts. If you set up a sub summary part "when sorted by" a location field (either a field in Stock move or a related field in Location), you can put the location name field in this sub summary part to serve as a sub header for that location.
If you add a second sub summary part below it, "when sorted by StockID--another field you should have in Stock Move, you can put sTotal in this sub summary part to show the total on hand for that item.
The body part can be deleted from this layout as you don't appear to need to list the individual stock moves--just the totals for each item.
If you then sort by location and then by StockID, you'll get lists of quantities on hand for each item at each location.
Many thanks for this. Two quick questions as I try this.
Firstly can you point me to some of the other posts on this?
Do I build this report in the Stock_Move table or in the Product table?
This report will be built on Stock Move.
You can enter "inventory Ledger" in the search the forum box at the top of this screen and see what thread are found with this phrase.
Seems to be working well. I will implement it in the main database now.
Actually there are two small extra questions.
Can I display the stock holdings in the various locations under the product record in product.
Finally can I choice just one location to show in the report we've just created. Would I use a perform find based on a location dropdown list global field?
2) what version of FileMaker do you have? With FileMaker 12, I've worked out a nifty way using ExecuteSQL to do this.
Setting this up in Filemaker 11 and earlier is also possible but requires a very different and much more complex method with relationships and summary fields or aggregate function calculations to do the same thing.
Yes you can. One of the nice things with summary reports is you can get a lot of different reports by performing differnt finds and/or sorting in a different order. (if a sub summary part specifies a "sorted by" field not used in the current sort order, it disappears from view.)
This script could use your global field for location. I'll call it globals::gLocation.
Go to Layout [Summary report layout (stockMoves)]
Enter Find Mode 
Set Field [StockMove::Location ; Globals::gLocation ]
Set Error capture [on]
Sort [Resore ; no dialog ] //sort by location, then by StockID even though all found records are from the same location
You might also use this for the set field step if your relationship supports it:
Set field [Location::LocationName ; Globals::gLocation]