Baylah Posted September 11, 2005 Posted September 11, 2005 Sorry to be so needy today.... Can someone please download and open the attached file Op perf After Open screen Click on button "rank by employee cost per Unit" Script will display a sorted report. What I can not figure out is it does not sort properly. It should sort from lowest to highest based on cost per unit. Anyone who looks will see this is obviously not the result. I have spent hours trying to figure this out and I am sure I am doing something fundamentally wrong when I set up the report, but in following the insrtuctions from the FMP documentation regarding "Sorting records by subsummary values" I don't understand why it is not working. Anyone who can help me figure this out, forward me your e-maill addy and I'll figure out a way to repay your efforts. Thanks so much for any help. Steve [email protected] Operator_Perf._DB.zip
LaRetta Posted September 12, 2005 Posted September 12, 2005 Hi Steve, You have your regular CostPerUnit field displayed. Change it to the summary CostPerUnit. I think this will solve it. It then sorts correctly. In truth, it was sorting right ... but you had the wrong field displayed, maybe?
SlimJim Posted September 12, 2005 Posted September 12, 2005 (edited) The problem is the unstored calculation field cost_per_unit and the fact that you are sorting by operator in your script and doing a subsummary by operator on your layout. A simple change from operator to cost-Per-Unit in these two places does not work because of the unstored calculation which is get summries based on operator. As a work-round I introduced a new number field CPU into you Op Perf tables and then copied the contents of the Cost_per_unit field into it across all the records (by a Replace) Using this field instead of Cost_Per_unit and doing the sorting and the subsummary part by the same field CPU the report comes out right. Of course this work-round may be totally unsuitable for you. It doesn't update. If the only place you use it is this report the you could possibly script the updating of CPU at the beginning of the script. But as your number of records increase the script is going to get slower and slower. I didn't see LaRetta's post so maybe I have over complicated things here (a habit!) Edited September 12, 2005 by Guest
Baylah Posted September 12, 2005 Author Posted September 12, 2005 Hey Slim, I figured the probl;em was with the unstored data and I actually was thinking of a work-around as you stated. Can you post the file you reworked so I can look at what you did? I would appreciate it a lot. LaRetta, I (thought) tried what you suggested but it wasn;t working for me. I will go back and try again. Thanks for you help.
Baylah Posted September 12, 2005 Author Posted September 12, 2005 Hi Laretta, I just substitued fields (actually added the summary field) to the sort as you suggested, and your right is does sort properly, but the problem is it does not sort "after the math is done" that shows the unit cost. That is the important number to me. I really don;t understand why this sort is not working properly based solely on what I have. It seems like a flaw in the program. I understand Slim Jims ost and as stated above I was thinking of doing the same but that seemed like overkill, maybe not though... Geesh, I thought this would be easy! Thanks for your help though....Back to the drawing board. Steve
Baylah Posted September 12, 2005 Author Posted September 12, 2005 SLIM JIM! You Rock! Perfect! Thank you, Thank you, Thank you! Steve
Baylah Posted September 12, 2005 Author Posted September 12, 2005 For anyone who might be interested, attached is how I fixed the problem. Thanks to Slim Jim for confirmimng my suspicions and dropping the "hint" on the replace field script step. My thinking on a workaround was much more involved. I was able to automate the reports in scripting and am very happy with the results. Let's just hope the bosses are too! steve Op_Perf.zip
Recommended Posts
This topic is 7110 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now