Want changes to our custom Christmas list
Moderators: Moderators, Tech Support
-
- Posts: 332
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Want changes to our custom Christmas list
We ask the congregation to send cards to our shutins, sick, etc. I set an activity code of 9004 to all those I want on this list and we distribute the list. If only one person of a family has this code.....NO problem.
If both spouses have the code then I get a line printed for each of them and with the same address, i.e.
Jane Doe 123 Elm st.
John Doe 123 Elm st.
I'd like to see it print out as
Jane & John Doe 123 Elm st. but I can't figure out how to do that. You may ask 'why don't you just code one of the shutins'. Well, then the other spouse will not be on the list and may not receive a christmas card. You know how it goes??
Anyone know how I could get both spouses on one line if both have the same Actv. code?
Thanks.
If both spouses have the code then I get a line printed for each of them and with the same address, i.e.
Jane Doe 123 Elm st.
John Doe 123 Elm st.
I'd like to see it print out as
Jane & John Doe 123 Elm st. but I can't figure out how to do that. You may ask 'why don't you just code one of the shutins'. Well, then the other spouse will not be on the list and may not receive a christmas card. You know how it goes??
Anyone know how I could get both spouses on one line if both have the same Actv. code?
Thanks.
-
- Program Development
- Posts: 1225
- Joined: Fri Sep 05, 2003 11:43 am
- Location: PowerChurch Software
- Contact:
Re: Want changes to our custom Christmas list
You are going to have to handle this like a church directory.
Sort the records by family names and address
In the report layout create a group for each family
Build a variable to hold the names in the family
The detail band would be empty and all the output would be in the group footer
Take a look at church directory examples and apply them to activities.
Another option, would it work to just print mailing labels to this group using the built-in label process? This will automatically combine the names to the family in that group.
Sort the records by family names and address
In the report layout create a group for each family
Build a variable to hold the names in the family
The detail band would be empty and all the output would be in the group footer
Take a look at church directory examples and apply them to activities.
Another option, would it work to just print mailing labels to this group using the built-in label process? This will automatically combine the names to the family in that group.
-
- Posts: 332
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Re: Want changes to our custom Christmas list
I checked out the labels option and that does work the way I want but not in the format I like.
I may tackle the "directory" option when I get in the mood
.
Thanks much for your help.
I may tackle the "directory" option when I get in the mood

Thanks much for your help.
-
- Posts: 332
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Re: Want changes to our custom Christmas list
Well, I tackled it but I'm loosing the game. I did what you suggested and grouped on the usual Last-a, first, and address, then created a variable:
IIF((Qmf_temp.pers_no = 1), Qmf_temp.firstname_b,"")
for the name of the spouse1 if he's got the skills code and then for spouse 2 if she's been selected (filtered).
I then created a var. m.formattednames which looks like:
IIF((m.name1 > " " AND m.name2 > " "),Qmf_temp.nameline, IIF((m.name1 > " "), Qmf_temp.firstname_b + " "+ Qmf_temp.lastname_b, IIF ((m.name2 > " "), Qmf_temp.firstname_b + " " + Qmf_temp.lastname_b, Qmf_temp.nameline))
I'm getting a "Function Name is missing )." error on this variable.
If I try to run the report it gives me:
Report could not be generated because of a Function is missing ).
I've spent too much time of this one and I don't have many or hairs to pull out.
Please advise. Thanks.
IIF((Qmf_temp.pers_no = 1), Qmf_temp.firstname_b,"")
for the name of the spouse1 if he's got the skills code and then for spouse 2 if she's been selected (filtered).
I then created a var. m.formattednames which looks like:
IIF((m.name1 > " " AND m.name2 > " "),Qmf_temp.nameline, IIF((m.name1 > " "), Qmf_temp.firstname_b + " "+ Qmf_temp.lastname_b, IIF ((m.name2 > " "), Qmf_temp.firstname_b + " " + Qmf_temp.lastname_b, Qmf_temp.nameline))
I'm getting a "Function Name is missing )." error on this variable.
If I try to run the report it gives me:
Report could not be generated because of a Function is missing ).
I've spent too much time of this one and I don't have many or hairs to pull out.
Please advise. Thanks.
-
- Program Development
- Posts: 463
- Joined: Fri Sep 05, 2003 3:08 pm
- Location: PowerChurch Software
- Contact:
Re: Want changes to our custom Christmas list
When I work with long inline ifs like this I break it down in an editor like Windows Notepad as such:John Dykema wrote:Well, I tackled it but I'm loosing the game. I did what you suggested and grouped on the usual Last-a, first, and address, then created a variable:
IIF((Qmf_temp.pers_no = 1), Qmf_temp.firstname_b,"")
for the name of the spouse1 if he's got the skills code and then for spouse 2 if she's been selected (filtered).
I then created a var. m.formattednames which looks like:
IIF((m.name1 > " " AND m.name2 > " "),Qmf_temp.nameline, IIF((m.name1 > " "), Qmf_temp.firstname_b + " "+ Qmf_temp.lastname_b, IIF ((m.name2 > " "), Qmf_temp.firstname_b + " " + Qmf_temp.lastname_b, Qmf_temp.nameline))
I'm getting a "Function Name is missing )." error on this variable.
If I try to run the report it gives me:
Report could not be generated because of a Function is missing ).
I've spent too much time of this one and I don't have many or hairs to pull out.
Please advise. Thanks.
I usually use an editor which shows the white space with dots. I used periods above to show the level of parenthesis.IIF
(
..(
....m.name1 > " " AND m.name2 > " "
..)
..,Qmf_temp.nameline, IIF
..(
....(
......m.name1 > " "
....)
...., Qmf_temp.firstname_b + " "+ Qmf_temp.lastname_b, IIF
....(
......(
........m.name2 > " "
......)
......, Qmf_temp.firstname_b + " " + Qmf_temp.lastname_b, Qmf_temp.nameline
....)
..)
Tracy
-
- Posts: 332
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Re: Want changes to our custom Christmas list
Thanks, Tracy.
I know that each parenthesis has to be paired up. In my example I see I have 11 paran's. That's not good. I've tried all kinds of combinations, removing, adding etc to no avail. I still get the error. I've verified the two variables m.name1 and m.name2 so I know those are good. It's the m.formattedname that's the culprit. I did spot one line that was incorrect. The m.name1 must return qmf_temp_firstname_A, not firstname_B, the way I had it in my example.
Is there something obvious to you what could be wrong with this variable?
I know that each parenthesis has to be paired up. In my example I see I have 11 paran's. That's not good. I've tried all kinds of combinations, removing, adding etc to no avail. I still get the error. I've verified the two variables m.name1 and m.name2 so I know those are good. It's the m.formattedname that's the culprit. I did spot one line that was incorrect. The m.name1 must return qmf_temp_firstname_A, not firstname_B, the way I had it in my example.
Is there something obvious to you what could be wrong with this variable?
-
- Program Development
- Posts: 463
- Joined: Fri Sep 05, 2003 3:08 pm
- Location: PowerChurch Software
- Contact:
Re: Want changes to our custom Christmas list
John,
Not paring the parenthesis, quotes (single or double), missing a comma and sometimes missing a + concatenator will bring this error up. Copy the existing variable string you have perhaps another pair of eyes will see the trouble.
Not paring the parenthesis, quotes (single or double), missing a comma and sometimes missing a + concatenator will bring this error up. Copy the existing variable string you have perhaps another pair of eyes will see the trouble.
Tracy
-
- Posts: 332
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Re: Want changes to our custom Christmas list
OK,
variables:
m.name1- IIF((Qmf_temp.pers_no = 1), Qmf_temp.firstname_b,"")
m.name2- IIF((Qmf_temp.pers_no = 2), Qmf_temp.firstname_b,"")
Now I finally verify clean with the following m.formattedname variable:
IIF (NOT EMPTY(m.name1) AND (m.name2), Qmf_temp.nameline," ")
IIF(NOT EMPTY(m.name1), m.name1 + " "+ Qmf_temp.lastname_b," ")
IF(NOT EMPTY(m.name2), m.name2 + " " + Qmf_temp.lastname_b, " ")
Now I get "This report could not be generated because of the error- Syntax error"
This is really a simple report and the variables are clean. What gives?
variables:
m.name1- IIF((Qmf_temp.pers_no = 1), Qmf_temp.firstname_b,"")
m.name2- IIF((Qmf_temp.pers_no = 2), Qmf_temp.firstname_b,"")
Now I finally verify clean with the following m.formattedname variable:
IIF (NOT EMPTY(m.name1) AND (m.name2), Qmf_temp.nameline," ")
IIF(NOT EMPTY(m.name1), m.name1 + " "+ Qmf_temp.lastname_b," ")
IF(NOT EMPTY(m.name2), m.name2 + " " + Qmf_temp.lastname_b, " ")
Now I get "This report could not be generated because of the error- Syntax error"
This is really a simple report and the variables are clean. What gives?

-
- Program Development
- Posts: 463
- Joined: Fri Sep 05, 2003 3:08 pm
- Location: PowerChurch Software
- Contact:
Re: Want changes to our custom Christmas list
Code: Select all
IIF (NOT EMPTY(m.name1) AND (m.name2), Qmf_temp.nameline," ")
IIF(NOT EMPTY(m.name1), m.name1 + " "+ Qmf_temp.lastname_b," ")
IF(NOT EMPTY(m.name2), m.name2 + " " + Qmf_temp.lastname_b, " ")
Code: Select all
IIF (NOT EMPTY(m.name1) AND EMPTY(m.name2), Qmf_temp.nameline," ") + IIF(NOT EMPTY(m.name1), m.name1 + " " + Qmf_temp.lastname_b," ") + IIF(NOT EMPTY(m.name2), m.name2 + " " + Qmf_temp.lastname_b, " ")
Code: Select all
IIF (EMPTY(m.name1) AND EMPTY(m.name2), Qmf_temp.nameline," ") + IIF(NOT EMPTY(m.name1), m.name1 + " " + Qmf_temp.lastname_b," ") + IIF(NOT EMPTY(m.name2), m.name2 + " " + Qmf_temp.lastname_b, " ")
Which can be simplfied to:
Code: Select all
IIF (EMPTY(m.name1) AND EMPTY(m.name2), nameline, IIF(NOT EMPTY(m.name1), m.name1 + " " + lastname_b, m.name2 + " " + lastname_b)
Tracy
-
- Posts: 332
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Re: Want changes to our custom Christmas list
Tracy, thanks for all your time on this one. I programmed in COBOL for many years but this language is the hardest for me. Anyway, I did use you're last suggested paragraph and it did work after I added another ) on the end
but doesn't give the results we want.
Isn't it possible to code somehow "if name.1 and name2 are not empty"? I just can't get the syntax right. In fact, they will NEVER be BOTH empty because of the filter I'm using, but both spouces may be coded to receive a christmas card, in which case I'll use the Nameline. The rest of the paragraph is clear to me.
Thanks again.

Isn't it possible to code somehow "if name.1 and name2 are not empty"? I just can't get the syntax right. In fact, they will NEVER be BOTH empty because of the filter I'm using, but both spouces may be coded to receive a christmas card, in which case I'll use the Nameline. The rest of the paragraph is clear to me.
Thanks again.
-
- Program Development
- Posts: 1225
- Joined: Fri Sep 05, 2003 11:43 am
- Location: PowerChurch Software
- Contact:
Re: Want changes to our custom Christmas list
The easiest way to see if both variable are empty is to use:
If both variables are empty, this will return "true"
Sorry read you post again, and this is not what you are loking for.
Code: Select all
EMPTY(m.name1+m.name2)
Sorry read you post again, and this is not what you are loking for.

-
- Program Development
- Posts: 1225
- Joined: Fri Sep 05, 2003 11:43 am
- Location: PowerChurch Software
- Contact:
Re: Want changes to our custom Christmas list
How is the m.name1 variable getting populated? Will it always have a value? If so, we really only need to worry about if the second variable as an entry or not.
To see if both have a value you would have to use:
To see if both have a value you would have to use:
Code: Select all
(NOT EMPTY(m.name1)) AND (NOT EMPTY(m.name2))
-
- Posts: 332
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Re: Want changes to our custom Christmas list
Jeff, let me summarize what I've done so far. As per your first response way above, I've grouped families the standard method.
I set up 2 variables to capture the spouses names: They are populated as
m.name1- IIF((Qmf_temp.pers_no = 1), Qmf_temp.firstname_b,"")
m.name2- IIF((Qmf_temp.pers_no = 2), Qmf_temp.firstname_b,"")
They will always have the initial value in both vars of "" and both verify clean. They will never both be blank because of my Edit Record filters.
Now, to get my group footer name field to print as:
John Doe, (if only the first spouse get a christmas card and)
Jane Doe, (if only the second spouse gets a card), and
John & Jane Doe (if BOTH spouses are coded to get a card). Seems simple enough doesn't it?
Both Tracy and you have been gracious to suggest coding and I've combined them to be :
IIF(NOT EMPTY(m.name1)) AND (NOT EMPTY(m.name2)), Qmf_temp.nameline, IIF(NOT EMPTY(m.name1), m.name1 + " " + Qmf_temp.lastname_b, m.name2 + " " + Qmf_temp.lastname_b))
I'm still getting a missing comma error. Please advise. Thanks.
I set up 2 variables to capture the spouses names: They are populated as
m.name1- IIF((Qmf_temp.pers_no = 1), Qmf_temp.firstname_b,"")
m.name2- IIF((Qmf_temp.pers_no = 2), Qmf_temp.firstname_b,"")
They will always have the initial value in both vars of "" and both verify clean. They will never both be blank because of my Edit Record filters.
Now, to get my group footer name field to print as:
John Doe, (if only the first spouse get a christmas card and)
Jane Doe, (if only the second spouse gets a card), and
John & Jane Doe (if BOTH spouses are coded to get a card). Seems simple enough doesn't it?
Both Tracy and you have been gracious to suggest coding and I've combined them to be :
IIF(NOT EMPTY(m.name1)) AND (NOT EMPTY(m.name2)), Qmf_temp.nameline, IIF(NOT EMPTY(m.name1), m.name1 + " " + Qmf_temp.lastname_b, m.name2 + " " + Qmf_temp.lastname_b))
I'm still getting a missing comma error. Please advise. Thanks.
-
- Program Development
- Posts: 463
- Joined: Fri Sep 05, 2003 3:08 pm
- Location: PowerChurch Software
- Contact:
Re: Want changes to our custom Christmas list
I'm noticing a couple of things now.
should be
because m.name1 will become to blank when pers_no = 2, the initial value of the variable needs to be "", and reset at the grouping
next your variable formatedname should be this
If both names have something in it, use the nameline value, otherwise use the individuals name.
Code: Select all
m.name1- IIF((Qmf_temp.pers_no = 1), Qmf_temp.firstname_b,"")
m.name2- IIF((Qmf_temp.pers_no = 2), Qmf_temp.firstname_b,"")
Code: Select all
m.name1- IIF((Qmf_temp.pers_no = 1), Qmf_temp.firstname_b,m.name1)
m.name2- IIF((Qmf_temp.pers_no = 2), Qmf_temp.firstname_b,m.name2)
next your variable formatedname should be this
Code: Select all
IIF((NOT EMPTY(m.name1)) AND (NOT EMPTY(m.name2)), Qmf_temp.nameline, IIF(NOT EMPTY(m.name1), m.name1 + " " + Qmf_temp.lastname_b, m.name2 + " " + Qmf_temp.lastname_b))
Tracy
-
- Posts: 332
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Re: Want changes to our custom Christmas list
Now I understand how the m.name1 & 2 vars should get populated. That blew right past me. Thanks.
I also copied/pasted the last variable into my program and now it works
. Now all I have to do is Alltrim the names and I'll be done.
Note, when I do the verify test on the last variable I still get an Operator/Operand Mismatch error. Could that be a gliche in the system?
Also, if I were to buy a manual on this Report generator language, which one would you recommend?
Thanks for being patient and your time.
John
I also copied/pasted the last variable into my program and now it works

Note, when I do the verify test on the last variable I still get an Operator/Operand Mismatch error. Could that be a gliche in the system?
Also, if I were to buy a manual on this Report generator language, which one would you recommend?
Thanks for being patient and your time.
John