October 7, 201213 yr I have a report that is broken into sub-summaries. I wish to be able to count how many different summaries there are. How do I achieve this. I tried using count(fieldname) (fieldname = the field that the summary is sorted by) but it always returned 1.
October 7, 201213 yr See if this helps: http://fmforums.com/forum/topic/61158-number-of-employees-from-payroll-report/page__st__-20#entry289204
October 7, 201213 yr Author I'll give it a shot, thank you. I am not entirely sure what the getSummary function does, can you please explain? I read up on it but it doesn't make too much sense to me.
October 7, 201213 yr GetSummary() retrieves the sub-summary value of a summary field. It's the same value you see when you place the summary field in a sub-summary by breakfield part.
October 8, 201213 yr Author Thanks. This seems to work in the layout, when I have the final count in the sub-summary by which I want to count. However, when I assign it to a variable in a script, it always returns 1. How can I work around this?
October 9, 201213 yr Author got it! actually, appears not. i thought it was working, but then changed my script and now it's not giving the right value, but am finding it the same way as before. i have it enter preview mode, grab the value from the field, and then return to browse mode. this works for a different field, but not this one. strange.
October 9, 201213 yr It's not necessary to enter Preview mode. However, records must be sorted. BTW, If you only want to populate a variable, you could have let the script do the count and eliminate the extra fields.
Create an account or sign in to comment