September 25, 200916 yr Is there a way to programmatically determine the number of subsummary occurences in list view/browse mode. I have a function that calculates the minimum height of a window (based simply on the layout size and the foundcount). I would like to include subsummaries on this window now in FM10, but I cannot do so without knowing how this will affect the window height. If there’s an easy way to determine the number of times the subsummary will occur given the foundset, then I should be able to factor that into the window height function.
September 25, 200916 yr Sub-summaries only appear once per unique value in whichever field the found set is sorted by. So you could create a script that does something like this: go to record (first) loop if fieldYouAreSortingBy ≠ $lastFieldContents set variable $summaryOccurrences to $summaryOccurrences + 1 end if set variable $lastFieldContents to fieldYouAreSortingBy go to record (next, exit after last) end loop show custom dialog $summaryOccurrences Then use $summaryOccurrences in your window height calculation. Hope that helps. James
September 25, 200916 yr It can be calculated - see: http://fmforums.com/forum/showpost.php?post/297916/ If you prefer a scripted count, I suggest you study the Fast Summaries technique by Mikhail Edoshin: http://www.kevinfrank.com/demo-files-78.html http://edoshin.skeletonkey.com/2006/12/crosstab_report.html
Create an account or sign in to comment