Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Report Design
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Report Design
Topic: Crystal Formula HELP
Author
Message
AndrewM
Newbie
Joined: 06 May 2010
Location: United Kingdom
Online Status: Offline
Posts: 4
Topic: Crystal Formula HELP
Posted: 06 May 2010 at 3:07am
Hi,
I am stuck with a formula!
I want to say if the field {mac.drug_description} does not start with "WARFARIN" then {mac.start_date} will be displayed
If {mac.drug_description} startswith "WARFARIN" then {mac.start_date} will not display
not({mac.drug_description} startswith "WARFARIN") then {mac.start_date}
else
{mac.start_date}
I hope that makes sense to someone
Cheers,
Andrew
IP Logged
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 06 May 2010 at 3:10am
if left({mac.drug_description}, len("warfarin")<>"WARFARIN" then
{mac.start_date}
done. if it doesn't start with that, then nothing will be displayed.
HTH
IP Logged
AndrewM
Newbie
Joined: 06 May 2010
Location: United Kingdom
Online Status: Offline
Posts: 4
Posted: 06 May 2010 at 3:14am
Hi thank you soooo much for your quick response
When i insert the formula i get the error message "The ) is missing."
Andrew
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 06 May 2010 at 4:05am
There was just a missing parenth to close the LEFT() portion...
as a new formula field
if left({mac.drug_description}, len("warfarin")
)
<>"WARFARIN" then
{mac.start_date}
or if it is just display/suppress place the {mac.start_date} on the canvas
right click
select format field
common tab
suppress formula box
{mac.drug_description} startswith "WARFARIN"
Edited by DBlank - 06 May 2010 at 4:06am
IP Logged
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 06 May 2010 at 4:48am
Didn't know there was a startswith keyword... never had much need of it, but something to keep in mind.
I like the suppression idea myself, I was just answering the question...I have a formula and it's not working....
IP Logged
AndrewM
Newbie
Joined: 06 May 2010
Location: United Kingdom
Online Status: Offline
Posts: 4
Posted: 07 May 2010 at 1:44am
Hey guys thank you soooooo much for your help its working perfectly now
Andrew
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.