wanderingsmith
Technical User
I have a subreport that goes through our database of parts and their transactions to calculate a Turnover ratio for each part. I store the part numbers in string array TurnoverPN, and at the same [element address] in number array Turnover, I store my calculated ratio.
At the end of the SubReport (or back in the main report at the same time as I go through the results of other subreports to compute a cycle count frequency rating, I don't care), I want to go through the ratios and order them (and their p/n) so that I can then identify the top 10% and 20%.
Due to, even after ignoring those with ratio of zero, there still being more than 1k parts, I'm storing the first 999 in Turnover, and then switching to Turnover2 (similarly, TurnoverPN and TurnoverPN2).
I tried doing a nested for loop sorting using the maximum() function and it squawked 'A loop was evaluated more than the maximum number of times allowed'. I've since found a reference that dual for sorting should only be used for arrays of 150 elements or less.. Ok. So what do I use for larger ones? I, of course, would really rather not have to create 20 arrays and work through them... though come to think.. pretty sure that'd still trigger the same error.
Any help'd be appreciated
At the end of the SubReport (or back in the main report at the same time as I go through the results of other subreports to compute a cycle count frequency rating, I don't care), I want to go through the ratios and order them (and their p/n) so that I can then identify the top 10% and 20%.
Due to, even after ignoring those with ratio of zero, there still being more than 1k parts, I'm storing the first 999 in Turnover, and then switching to Turnover2 (similarly, TurnoverPN and TurnoverPN2).
I tried doing a nested for loop sorting using the maximum() function and it squawked 'A loop was evaluated more than the maximum number of times allowed'. I've since found a reference that dual for sorting should only be used for arrays of 150 elements or less.. Ok. So what do I use for larger ones? I, of course, would really rather not have to create 20 arrays and work through them... though come to think.. pretty sure that'd still trigger the same error.
Any help'd be appreciated