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: Formula Syntax
Author
Message
sri-knight22
Newbie
Joined: 06 Jan 2012
Online Status: Offline
Posts: 16
Topic: Formula Syntax
Posted: 13 Jun 2012 at 2:47am
I am still working on getting three different things to show from one field.
I have the formula of how i think it should read, but I am not a programer by any means, and I have only taken a 3 day beginner class.
Here is the formula as I have it.
if {WORKORDERSQUAWKS.LABORMETHOD} = "Time & Materials"
then "Labor Rate:" totext {WORKORDERSQUAWKS.LABORPRICE}
If {WORKORDERSQUAWKS.LABORMETHOD} = "Flat Rate"
"Labor Price:" totext {WORKORDERSQUAWKS.LABORPRICE}
If {WORKORDERSQUAWKS.LABORMETHOD} = "No Charge"
then "Labor Price: No Charge"
IP Logged
rkrowland
Senior Member
Joined: 20 Dec 2011
Location: England
Online Status: Offline
Posts: 259
Posted: 13 Jun 2012 at 3:00am
I'd do it like this;
stringvar val:= totext({WORKORDERSQUAWKS.LABORPRICE});
select {WORKORDERSQUAWKS.LABORMETHOD}
case "Time & Materials": "Labor Rate: " & val
case "Flat Rate": "Labor Price: " & val
case "No Charge": "Labor Price: No Charge"
default: "Unknown";
Regards,
Ryan.
Edited by rkrowland - 13 Jun 2012 at 3:17am
IP Logged
sri-knight22
Newbie
Joined: 06 Jan 2012
Online Status: Offline
Posts: 16
Posted: 13 Jun 2012 at 8:55am
IP Logged
sri-knight22
Newbie
Joined: 06 Jan 2012
Online Status: Offline
Posts: 16
Posted: 13 Jun 2012 at 8:56am
Thanks. that did the trick
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
|
BAEZL
© 2004-2026 Brian Bischof. All Rights Reserved.