Get a family count on information sheets

Postby John Dykema » Wed Dec 21, 2016 12:23 pm

I print a sheet for each family showing each family member in order to get updated information for our Directory.
I want a count of all sheets on the summary sheet at the end.
I added a variable m.families and set Value to Store to m.families + 1
Calculation type: is set to Count
Reset value is Group:Qmf_temp.lastname_a+ Qmf_temp.firstname_a+ Qmf_temp.address
I get only 2 families on the Summary Page.
If I change the reset value to Report, I get 447 families (which is actually counting profiles).
If I change the reset value to Page, I get 2 families (which is actually the profiles of the last family).
I've also tries checking the 'Release after Report' box to no difference.
Please advise as to how to get number of families.
Running Windows 10 on HP Desktop. Thanks much.
John Dykema
 
Posts: 288
Joined: Sun Sep 28, 2003 4:37 pm
Location: First Cutlerville Christian Reformed Church

Re: Get a family count on information sheets

Postby Zorak » Wed Dec 21, 2016 5:43 pm

If you don't have it already, add the Mail_No field to your output fields.

Create a variable called m.LastFamily that starts at 0 and in the value to store set it to Mail_No. Move that variable all the way down to the bottom of the variables list, so it is the last thing that fires.

On your m.Families variable, change the value to store to the following:

Code: Select all
IIF(mail_no=m.LastFamily,m.Families,m.Families+1)


That basically says, if this family that I'm looking at is the same as the last family I looked at, then keep the same count. If it is a new family, add one to the count.
Zorak
Tech Support
Tech Support
 
Posts: 2493
Joined: Thu May 13, 2004 8:59 am
Location: PowerChurch Software

Re: Get a family count on information sheets

Postby John Dykema » Thu Dec 22, 2016 11:55 am

Wow, I would never have thought of that one. The count is now correct.
Thanks much for that solution. John
John Dykema
 
Posts: 288
Joined: Sun Sep 28, 2003 4:37 pm
Location: First Cutlerville Christian Reformed Church