Matt Malyschko Posted October 7, 2012 Posted October 7, 2012 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.
comment Posted October 7, 2012 Posted October 7, 2012 See if this helps: http://fmforums.com/forum/topic/61158-number-of-employees-from-payroll-report/page__st__-20#entry289204
Matt Malyschko Posted October 7, 2012 Author Posted October 7, 2012 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.
comment Posted October 7, 2012 Posted October 7, 2012 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.
Matt Malyschko Posted October 8, 2012 Author Posted October 8, 2012 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?
Matt Malyschko Posted October 9, 2012 Author Posted October 9, 2012 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.
comment Posted October 9, 2012 Posted October 9, 2012 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.
Recommended Posts
This topic is 4428 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