February 11, 200323 yr I'm trying to create a report which will put the number of found records in a global field within the report layout. I also need an average rating from a field in the found set to be put into the report. Both of these problems seem easy enough when working over all the records in the database but not when working on a found set! There is probably an easy enough answer to this one so a script pointing me in the right direction would be much appreciated.
February 12, 200323 yr Try with the GetSummary () function Find records Sort them on the Break field -- this is a must do Use the step Set field (global, GetSummary (YourSummaryField, break field) Since in your case you're not subsummarizing (breaking) the found set by any field create a Constant field, calculated =1 and sort on that ... sorting is necessary else the GetSummary function won't calculate properly YourSummary field would be the total field or the average field you mention ...
February 12, 200323 yr If you want to show the number of records in a found set on a report, just put the text "@@" on the layout. To show an average of a field in the found set, create a summary field ( average of field xxx), and put it on the layout. It will only average the records in the found set.
February 13, 200323 yr Author Bob The symbols "@@" on the layout gives you the record number and not number of records?!
February 13, 200323 yr Oops, right. You will need to create an unstored calculation field with the formula: Status(CurrentFoundCount) and then place this field on the layout.
Create an account or sign in to comment