Traditionally, what you are doing now is correct. A subsummary report is based on teh found set. What version of FMP are you using. FMP10 allows subsummaries sortings in browse mode.
Thanks for the reply. I am running OSX 10.5 w/ FM Pro 10 Advanced.
As for 'sorting', I don't really have a problem. I would like to find a better way to 'filter' by Patient just the selected Patient tests....
Define a global field, gPatientName, and place it in the header.
write a script:
Enter Find Mode 
Set Field [yourpatienttable:: PatientName, YourTable::gPatientName]
Set error capture [on]
Perform find 
Set error capture [off]
Now format gPatientName as a drop down list of patient names.
Set a script trigger on gPatientName to use On Modify to perform the above script.
You can actually set up several drop down menus and use this technique to filter the report several different ways if you want. I used to do this all the time with MS Access files and now it's nice to do it in FMP also.
Thanks for the code. This is what I have been doing so it looks like that method is 'the' way to do it.
One thing I have noticed is that the popup, after making a selection, requires the user to 'click' somewhere
to activate the script. I got around this with a "GO" button which runs the script. But, shouldn't be some way
to activate the contents of a popup 'on selection'???
I just went and checked a layout where I use this trick. I use a script trigger that performs the script "on Object Exit". That's what's worked for me.
Yes, the code works great. Were you using a popup ? If so, did you have to click 'outside' the layout to make the choice effective?
I used a dropdown list with the arrow and auto-complete options enabled. I didn't have to click a second time to trigger the script. That's a good question, sometimes you have to experiment with your different field format and script trigger options to get a good combination.