April 8, 201114 yr Okay, this is somewhat embarrassing, but I can't seem to get a simple sub-summary part to display summary data properly. Table 1: Stocks -- 1 record per financial stock, with fields for Ticker, Manager (each stock only managed by 1 person), and a few others Table 2: Trades -- child table, 1 record per stock sale, w/ fields for date, # of shares, buy price, sale price, net $, etc. In the Trades table, I have various summary fields like "Total $ invested" and "Count of Trades" so that from the Stocks context I can see combined data for all trades of a single stock. This works fine. So, on to the problem. I want to have a sub-summary layout where the stocks are grouped by Manager, and I can see their combined performance over all the stocks they trade. Here's what I've built: Layout Name: Manager Subsummary View: List Context: Stocks Sub-Summary Part: [When sorted by Manager] - fields for Manager name, and the summary fields that also appear in the Body Body: fields for Stock name, Total trades, Net gain, Average months held, Annualized return. All right, so I find all records and perform a Sort on Manager name and Stock name. What I see: The stocks are appropriately grouped alphabetically under their managers. The Summary fields in the body are showing their proper values. BUT . . . the summary fields on the Sub-Summary Part *aren't* aggregating the data grouped in the body. Instead, they just show the same values as the first stock immediately below. I'm racking my brains now -- I've done this any number of times in the past, but can't seem to solve it now. What am I missing?
April 11, 201114 yr Author Hmmmm . . . do I take it from the lack of replies that I appear to be doing it right? Any comments?
April 11, 201114 yr Which of the fields are Summary, and which are calculations? My bet is that the field in the sub-summary part is not a summary field.
April 12, 201114 yr Author I believe all of the fields on the sub-summary are summary fields. But even if some were wrong, would *all* of them fail? Here's for instance is a picture of a field definition line in the Child (trades) table that counts how many trades there are bay taking a count of the primary key field. Also pictured is a shot of the layout of the sub-summary layout, and a shot of how it looks in browse mode, aftyer sorting. (I've tried to attach images, but I have no idea what it's going to look like as I've never done it before here and the preview looks totally screwed up, but I can't tell how to fix it.)
April 12, 201114 yr I believe all of the fields on the sub-summary are summary fields. Either you know or you don't. I've already told you what I think the problem is, and the solution involves actually checking what the fields are.
April 13, 201114 yr Author Okay, two of them are indeed summary fields (from the child 'Trades' table). THere are three others that are calculation fields. I tried removing them from the layout, but the summary fields still don't aggregate the numbers. :-/
April 13, 201114 yr the summary fields on the Sub-Summary Part *aren't* aggregating the data grouped in the body. IIUC, the summary fields are defined in the child Trades table while your report is done from the parent Stocks table. If so, then the summary fields aggregate the related set - and it doesn't matter on which layout part you place them. Either do the report from Trades, or use calculation fields to aggregate the related trades, and summary fields to summarize the calculation fields (all defined in the Stocks table).
January 18, 201213 yr Author Sorry to have been away from this for so long. To tell the truth, I went around and around with it so many times, trying so many different approaches, I became defeated. I no longer have a sense of what I'm testing out because I've added too many fields and layouts and its all a muddle. I'm attaching the file just in case someone can look at the tables and maybe offer a fresh layout solution salvaging what's there. Thanks for having a look. Oops -- didn't attach the file -- and now I'm finding that "You aren't permitted to upload this type of file. What am I missing? It's a 348K .fp7 file.
Create an account or sign in to comment