Creating Summary Records manually

“You don’t create summary records yourself, instead, Panorama automatically creates them for you when you tell it to divide the database into groups” (Panorama X Help)
In Panorama 6 you can create summary records manually yourself by inserting a blank record and using the Toggle Summary Level command. This is extremely useful for databases where there is no field to Group records in a desired ad hoc fashion. e.g. Say you have a database of all US counties and you want to Group them by population. Sorting on the population field and manually inserting a blank record at desired break points, toggling the summary level, then using the Count option, produces the desired result. I don’t see an easy way to replicate that in X.

You can write a procedure using the summarylevel command.

In Panorama X you can enable grouping of numeric fields in Panorama X Preferences > General.

That worked! Thank you Dave.

You got me out of a bind with this information once before KJM. However grouping on a numerical field is only useful if the values are categories (say equals a range of population- ≥5000 and <10,000) rather than attributes (actual population of that county). And, to make those categories, someone had had to group the raw population data!

I really, really, really discourage creating ad-hoc summary records this way. A much preferable solution is to create a new field and fill it in with values that will cause the grouping you want. You might find the Propagate Up command helpful with this. First get the database sorted the way you want (which you are apparently already doing), then fill in a value on the last item of each ad-hoc group. Once this is done use Propagate Up to fill in the rest of the empty values, then you can Group Up.

Even better would be using formulafill with the ?( function to fill in the values. Panorama X now allows multiple conditions with the ?( function, so you can do something like this:

field "PopCategory"
formulafill ?(Population≤5000,5000,

Of course you can set the break values to whatever you want.

Most helpful Jim! Could you elaborate a little on your strong objection to creating summary records “on the fly?”

I have multiple objections.

Most importantly, this technique won’t work if a database is shared with a server. Summary records aren’t shared on the server, while data records are. So converting a data record to a summary record would require that the record be deleted from the server. Instead, this operation simply isn’t allowed.

My other problems with this are more of style rather than substance. First of all, I don’t like the ad-hoc nature of this. It means that every time you want to group the database, you have to manually figure out the break points. I simply don’t think that is a good practice. I think it’s much better to come up with some algorithmic way to determine the summary break points, so that it can be done repeatedly, even if this means adding another field.

In the past, it was very easy to toggle between a data record and a summary record, no programming was required. This turned out to be a tech support nightmare, because users would forget that they had done this, and then complain that functions like sorting didn’t work properly. At some point I realized that being able to toggle between data records and summary records was unnecessary, and it was completely removed from the program except for the summarylevel statement.

It’s possible that in some future release the summarylevel statement might lose the ability to toggle between data and summary records. I really don’t like this feature. However, I have no immediate plans for that, so for now, if you want to keep using it this way on single user databases you can continue to do so with no consequence other than an arched eyebrow from my direction :roll_eyes:

As a general rule I follow the ‘proper’ procedure, but there are times when I need to do a ‘one off’ quick calculation to test an idea. I’m not connected to a server so that doesn’t become an issue in my case.
BTW, I can’t imagine a Microsoft, or Adobe taking the time to answer these questions, or pay attention to their customers like you do Jim. THANK YOU!

I just stick in an extra field with two values, Yes or No. I set them all to No, and when I need something added somewhere, I set it to Yes and do an additional selection.