Just to be clear on this: you have articles A, B, D, E, and H (each with a specific quantity), which are "Widgets", and C, F, and G (again each with its own quantity), which are "Doodads" – let's call these "Categories" (kinds) – and your sub-summary is broken by category. Correct so far?
Re the page count:
The total page count number needs to be scripted using either a $$mergeVariable or a global number field to store the captured value:
- Enter Preview mode
- Got to Record/Page [Last]
- Set Field /or/ Set Variable [ by calculation: Get (PageNumber) ]
- Enter Browse mode
and use that number on the layout as merged text for the global field or variable,
then continue with the reporting script, etc.
Thanks for the tip, Mr. Huston;
the database is becoming a priority again so I should be trying the steps soon.
1 of 1 people found this helpful
Just a tip, from something I've learned. I often have my printing scripted, so my users don't have to deal with the native print dialog. Therefore, I often have a pair of script steps for Print Setup and Print. If you do this, just make sure that your Print Setup step is before the steps that Stephen gave you, or you might end up with a different total number of pages. For this use, I love $$mergeVariables - no extra fields required.
If your printing is scripted, and you are OCD like me, you can add a step to set your $$pages variable to "" [null] at the end of your script, so your data viewer doesn't get cluttered with $$variables. Or if it is all scripted, and you have no need to leave the variable around or show the user outside of the script, you could use a $variable that won't stick around. Just make sure you match your Set Variable script step to the same $ or $$ style as the merge variable on your layout.
Thanks Mr. Huston and flybynight;
This is way more complicated than it needs to be (and you two are way smarter than I), so I'm just going to leave it at page number. You'd think by version 12 or 13 Filemaker would have figured out that people print the output of the database on occasion and it might be nice to have a built in way like the existing page number. Oh well!