Page 1 of 1
How do i print a ' like in It's in a custom report
Posted: Fri Jul 07, 2023 5:56 pm
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.
Operator/operand type mismatch
Posted: Fri Jul 07, 2023 9:07 pm
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
Re: How do i print a ' like in It's in a custom report
Posted: Mon Jul 10, 2023 9:19 am
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", "'", "")
Re: Operator/operand type mismatch
Posted: Mon Jul 10, 2023 9:26 am
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().