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 2020
:
Technical Questions
Topic: formula with return number and string
Oldest Post First
Newest Post First
Author
Message
huyenhall
Newbie
Joined: 07 Apr 2008
Online Status: Offline
Posts: 7
Topic: formula with return number and string
Posted: 08 Apr 2008 at 10:05am
I have this formula:
If {sort_codes} = "HX03" then {Building_sf}
else
If {sort_codes} = "A001" then {Street_name}
It was giving me an error "a number is expected" .
Can anyone help me to write this formula that returns both numbers and string?
Thanks,
IP Logged
saoco77
Senior Member
Joined: 26 Jun 2007
Online Status: Offline
Posts: 104
Posted: 08 Apr 2008 at 10:33am
Don't think you can do that within Crystal.
Listed below are the options to convert one of the two fields to a string or numeric value.
totext({table.field})
tonumber({table.field})
It's likely you'll have to convert the number to a string. Tonumber is generally used when you have a numeric field stored as text.
Hope this helps.
Sarah
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
This page was generated in 0.031 seconds.
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
CLICK PLAYS
|
COACH FORUMS
|
TROPICAL FISH
© 2004-2024 Brian Bischof. All Rights Reserved.