How to get a count of those without a photo

Moderators: Moderators, Tech Support

How to get a count of those without a photo

Postby John Dykema » Tue Jun 16, 2009 3:10 pm

For the life of me I cannot get a true count of those not having a family photo on file. I've tried variables and such. I am filtering all those with a Visit Area. I want to know how many I have at the bottom of the report without hand counting them. My names are coming out correctly but it's giving me the count of all in a visit area, not just those w/o a picture.
I'm using the variable m.count and also using the "right(alltrim......<>"NOPHOTO2.JPG" expression to only print when true. It's still counting all records. What am I missing?
I also want to do a report of the reverse, i.e. All those WITH a photo.
John Dykema
 
Posts: 226
Joined: Sun Sep 28, 2003 4:37 pm
Location: First Cutlerville Christian Reformed Church

Re: How to get a count of those without a photo

Postby Jeff » Wed Jun 17, 2009 9:16 am

John,

Your variable should look something like:

Code: Select all
m.count + IIF(Right(alltrim(family_picture),12)<>"NOPHOTO2.JPG",1,0)


This adds 1 to m.count if the picture <> "NOPHOTO2.JPG" otherwise it adds 0 to the variable. Set the initial value of the variable to 0 and make sure it doesn't reset till the end of the report.
Jeff
Program Development
Program Development
 
Posts: 1080
Joined: Fri Sep 05, 2003 10:43 am
Location: PowerChurch Software

Re: How to get a count of those without a photo

Postby John Dykema » Wed Jun 17, 2009 2:57 pm

I spent a very long time working on this but did not think of that expression. You guys are awesome. Thanks so much. Counts are perfect now. :D
John Dykema
 
Posts: 226
Joined: Sun Sep 28, 2003 4:37 pm
Location: First Cutlerville Christian Reformed Church


Return to Custom Reports