How do i print a ' like in It's in a custom report

Moderators: Moderators, Tech Support

Post Reply
John Dykema
Posts: 320
Joined: Sun Sep 28, 2003 5:37 pm
Location: First Cutlerville Christian Reformed Church
Contact:

How do i print a ' like in It's in a custom report

Post by John Dykema »

Using Windows 10 pro.
I are trying to print an ' by a name if the person is baptized. I'm using the variable m.baptized

IIF(UPPER(status_desc) = "BAPTIZED" OR UPPER(status_desc) = "INACTIVE BAPTIZED MEMBER","'","")
I get nott'n
Thank much.

John Dykema
Posts: 320
Joined: Sun Sep 28, 2003 5:37 pm
Location: First Cutlerville Christian Reformed Church
Contact:

Operator/operand type mismatch

Post by John Dykema »

Hi, I'm getting an Operator/operand type mismatch on this statement in several programs I use but the reports still run ok.
I've got variables built for this name configuration. Please advise. John

ALLTRIM(firstname_b)+m.prefname +" " +ALLTRIM(m.lastname) +" " +m.suffix +m.commun +m.baptized

Zorak
Tech Support
Tech Support
Posts: 3018
Joined: Thu May 13, 2004 9:59 am
Location: PowerChurch Software
Contact:

Re: How do i print a ' like in It's in a custom report

Post by Zorak »

John Dykema wrote:
Fri Jul 07, 2023 5:56 pm
IIF(UPPER(status_desc) = "BAPTIZED" OR UPPER(status_desc) = "INACTIVE BAPTIZED MEMBER","'","")
This works in my test report and the structure is the same as what you've got listed there.

Code: Select all

ALLTRIM(LASTNAME) + IIF(UPPER(STATUS_DESC)="MEMBER" OR UPPER(STATUS_DESC)="VISITOR", "'", "")

Zorak
Tech Support
Tech Support
Posts: 3018
Joined: Thu May 13, 2004 9:59 am
Location: PowerChurch Software
Contact:

Re: Operator/operand type mismatch

Post by Zorak »

John Dykema wrote:
Fri Jul 07, 2023 9:07 pm
Hi, I'm getting an Operator/operand type mismatch on this statement in several programs I use but the reports still run ok.
I've got variables built for this name configuration. Please advise. John

ALLTRIM(firstname_b)+m.prefname +" " +ALLTRIM(m.lastname) +" " +m.suffix +m.commun +m.baptized
The operator/operand type mismatch error means one of those variables is not a string. In the place where you defined those variables, make sure you have either replaced the default "Initial Value" of 0 (which spins up the variable as a number) with "" (empty quotes, so it's a string) or ensure the logic in the variable will always assign a value that is a string.

If it is a number that needs to be converted to a string, you can wrap it in a VAL(). For dates or booleans, you can wrap them in TRANSFORM().

Post Reply