Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Technical Questions
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Technical Questions
Topic: If Then Else Formula
Author
Message
Chris_Cook
Newbie
Joined: 03 Sep 2012
Online Status: Offline
Posts: 3
Topic: If Then Else Formula
Posted: 03 Sep 2012 at 1:38am
Hi
I created a simple (i thought it was) formula for a report I made. I just wanted it to return blank fields as a certain value:
IF ISNULL ({EMPLOYEE_TABLE.DISABLED}) THEN "NOBT" else {EMPLOYEE_TABLE.DISABLED}
I get the error - a string is required here - for the last field.
Any help would be really appreciated
Thanks
Chris
IP Logged
rpotts1973
Newbie
Joined: 04 Sep 2012
Online Status: Offline
Posts: 4
Posted: 04 Sep 2012 at 1:35am
Try using:
else
ToText({EMPLOYEE_TABLE.DISABLED})
IP Logged
Chris_Cook
Newbie
Joined: 03 Sep 2012
Online Status: Offline
Posts: 3
Posted: 04 Sep 2012 at 2:00am
Thank you, that worked great. Could I ask why the totext is needed for future reference?
IP Logged
rpotts1973
Newbie
Joined: 04 Sep 2012
Online Status: Offline
Posts: 4
Posted: 04 Sep 2012 at 2:08am
ToText is simply used to convert any value to a text value.
IP Logged
Chris_Cook
Newbie
Joined: 03 Sep 2012
Online Status: Offline
Posts: 3
Posted: 04 Sep 2012 at 2:21am
That's what i thought, it just confused me as the field is already a text field.
IP Logged
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 04 Sep 2012 at 7:21am
Apparently {EMPLOYEE_TABLE.DISABLED} is not a string or else CR would not give that error message.
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
delete your posts in this forum
You
cannot
edit your posts in this forum
You
cannot
create polls in this forum
You
cannot
vote in polls in this forum
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
KONACAD
© 2004-2026 Brian Bischof. All Rights Reserved.