March 13, 201213 yr I have the following summary field which gives mileage in one direction. I need a field that gives round trip mileage which basically is sCountReportMileage (Count = cReportMileage) * 2. This gives the correct value in the source table but only gives a value of 2 when I place this field in a related table. sCountReportMileage (Count = cReportMileage) displays the correct value in a related table. I think I need (open to suggestions obviously) sCountReportMileage (Count = cReportMileage) * 2 to be a summary field in it's own right and not a calculation field. Any ideas please?
March 13, 201213 yr Author i cannot follow your description. I'll try to simplify: sCountReportMileage (Total = cReportMileage) is a summary field that displays total mileage of railway route sections in one direction when running count and restart after each group are selected. This field can be placed on a related (one to many) table layout and display the correct value. I would like to create a field that doubles sCountReportMileage (Total = cReportMileage) so that it will give a round trip mileage (there and back). I would like this field to display the correct value on a related (one to many) table layout. I did create a calculation field called sCountRound Trip Mileage = (cReportMileage)*2 which gives the correct value in the table it was created in, but when I place that field on a related (one to many) table layout I get a value of 2 returned. Not sure whether I need a new table occurence so that sCountRound Trip Mileage = (cReportMileage)*2 displays the correct value on the related table layout or whether sCountRound Trip Mileage needs to be a summary field of some kind. Hope this is easier to understand.
March 13, 201213 yr This field can be placed on a related (one to many) table layout and display the correct value. As a rule, summary fields summarize the found set. To summarize the related set, use an aggregate function in the parent table - especially if you want to perform additional operations on the result. That would be something like = 2 * Sum ( ChildTable::Mileage ) I think. --- Why is a summary field that totals the mileage called sCountReportMileage??
March 13, 201213 yr Author --- Why is a summary field that totals the mileage called sCountReportMileage?? I was told on the forum that I needed a Count summary field. This didn't work until I changed it to a Total summary field. I didn't change the field name. Does this make more sense: sTotalReportMileage?
March 13, 201213 yr To me it does. As long as I am nitpicking, do you also have mileage other than report mileage?
March 13, 201213 yr I was the one who told him that on prior thread and that was based upon him saying he wanting same as another summary which counted mileage. Only further in the thread did we find out he wanted to total it instead, LOL.
March 14, 201213 yr I was told on the forum that I needed a Count summary field. Please do not double post your questions This is what happens when you start a splinter topic that should have been posted to the original topic. Let me know if you want me to merge the 2 topics. Lee
March 14, 201213 yr Thank you, Lee. In this case, I was just taking responsibility in not responding again on the prior thread telling him that yes, his changing it to total after we changed the need, would make sense. But this appears to be a different issue, although I'm unsure because it is still as confusing to me as it was the first time but I have faith in Comment to set him right.
March 14, 201213 yr You could go back further back into your data and create a new calculation which performs a x2 on the base data you used to create the 'total' summary and create a new 'total' summary of that calculation.
March 14, 201213 yr Author To me it does. As long as I am nitpicking, do you also have mileage other than report mileage? I do have mileage other than report mileage. Report mileage is what I want to appear on the report i.e not all records. I don't see it as nitpicking. I would like to learn how to name my fields with the most appropriate names, the same with table occurrences. I currently have Table 1, Table 2 etc, makes it difficult to remember why the TO was created in the first place. Appropriate naming helps me and you guys to try and understand the issues that I am having difficulty with.
March 14, 201213 yr Author I was the one who told him that on prior thread and that was based upon him saying he wanting same as another summary which counted mileage. Only further in the thread did we find out he wanted to total it instead, LOL. Yes LaRetta you got me...........I need to learn the difference between Count and Total! ;-) Please do not double post your questions This is what happens when you start a splinter topic that should have been posted to the original topic. Let me know if you want me to merge the 2 topics. Lee Lee, please feel free to merge topics if I have breached forum rules/best practice. You could go back further back into your data and create a new calculation which performs a x2 on the base data you used to create the 'total' summary and create a new 'total' summary of that calculation. Thanks for the tip John.
March 14, 201213 yr Lee, please feel free to merge topics if I have breached forum rules/best practice. I'm going to leave it as it is, unless those who are helping you see a need. I haven't been following your threads that closely, because you've had our best helping you and I'm a firm believer that too many chefs spoil the broth. The only thing that I would suggest is for you to attach a copy of your file, so those helping you see your file and zero in on the problem. HTH Lee
Create an account or sign in to comment