I haven't done much fancy stuff in custom reports so I'm seeking help.
I'm trying to print address1, address2, city+state+zip. If address2 is not empty, I want to add ", " to the end of address1, then print address2. And always printing a ", " + city-state-zip, all on the same line.
I'm pulling my hair out on this function:
ALLTRIM(Qmf_temp.address)+IIF(NOTEMPTY(Qmf_temp.address2),", "+ALLTRIM(Qmf_temp.address2),)+", " Qmf_temp.city_zip
I'm getting missing commas, and missing ), and/or syntax errors... grrrrr
If you know functions, would you please give me a hand here? Thanks.
Having trouble with functions
Moderators: Moderators, Tech Support
-
- Posts: 320
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Having trouble with functions
We are using PC+ v.11 with the latest upgrades, Win XP Pro, and 5 networked pc's.
We have 569 communicant and baptized members.
We have 569 communicant and baptized members.
-
- Program Development
- Posts: 1225
- Joined: Fri Sep 05, 2003 11:43 am
- Location: PowerChurch Software
- Contact:
John,
Try this expression:
NOTEMPTY is not a function, you could use "NOT EMPTY" OR "! EMPTY" or do what I did above and just return an empty string if the field is empty.
Try this expression:
Code: Select all
IIF(EMPTY(address), "", ALLTRIM(address)+", " ) + IIF(EMPTY(address2), "", ALLTRIM(address2) + ", ") + city_zip
-
- Posts: 320
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Thanks, Jeff. That worked great. I think I'm catching on to object programming
1. I'm following the Cust reports Tutorial, pge 80 and it shows all the fields, as I would expect. But, my edit only shows fields from lastname through address2. None of the other fields show up. They are all in my "Edit output fields" in the Query. What gives?
2. Also, I want to print our names as follows: JACKSON, Dave & Mary
I use the expression as shown in the Tutorial as: (I did add the UPPER function, myself)
UPPER(ALLTRIM(Qmf_temp.lastname_a))+', '+ Qmf_temp.salut
I set the bold by clicking the Style tab in the expression windows. But I don't want the Salutation bolded. I tried setting up a variable but there's no Style tab in the variable window.
How do I unbold the Salutation. Any advice?
1. I'm following the Cust reports Tutorial, pge 80 and it shows all the fields, as I would expect. But, my edit only shows fields from lastname through address2. None of the other fields show up. They are all in my "Edit output fields" in the Query. What gives?
2. Also, I want to print our names as follows: JACKSON, Dave & Mary
I use the expression as shown in the Tutorial as: (I did add the UPPER function, myself)
UPPER(ALLTRIM(Qmf_temp.lastname_a))+', '+ Qmf_temp.salut
I set the bold by clicking the Style tab in the expression windows. But I don't want the Salutation bolded. I tried setting up a variable but there's no Style tab in the variable window.
How do I unbold the Salutation. Any advice?
We are using PC+ v.11 with the latest upgrades, Win XP Pro, and 5 networked pc's.
We have 569 communicant and baptized members.
We have 569 communicant and baptized members.