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 statement in a text object
Author
Message
Central
Groupie
Joined: 16 Feb 2011
Online Status: Offline
Posts: 56
Topic: If statement in a text object
Posted: 06 Feb 2013 at 6:04am
Can you have an IF statement in a text box.
e.g.
Formulas @ABC, @CDE, @FGH
If database field = "y" then
@ABC
@CDE
@FGH
else
"There are no data to report etc.."
or can this be done in a formula and if so what would the syntax be?
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 06 Feb 2013 at 9:04am
you can conditionally suppress fields placed in the text box or you can create a new formula field to do what you desire
If {table.field}= "y" then
{@ABC
} + chr(13)
{@CDE
} + chr(13)
{@FGH
}
else
"There are no data to report etc.."
IP Logged
Central
Groupie
Joined: 16 Feb 2011
Online Status: Offline
Posts: 56
Posted: 07 Feb 2013 at 12:04am
Done as you replied and works a treat.
Thanks again for your help
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.