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: "Starts with"
Author
Message
Jon K
Newbie
Joined: 12 Aug 2009
Location: United States
Online Status: Offline
Posts: 8
Topic: "Starts with"
Posted: 11 Oct 2011 at 4:48am
I need to suppress if an OrderID starts with a 9. I know the SQL but I can't figure out the Crystal syntax.
Any help is appreciated!
Jon
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 11 Oct 2011 at 5:07am
is the orderid a numeric or text field?
if text
table.orderid startswith "9"
if numeric
totext(table.orderid) startswith "9"
IP Logged
Jon K
Newbie
Joined: 12 Aug 2009
Location: United States
Online Status: Offline
Posts: 8
Posted: 11 Oct 2011 at 8:52am
Hmm I can't get it to work.
I have this:
select * from customer_order where id like '9%'
and I get 34 records in SQL, but nothing in crystal when I use the syntax DBlank posted
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 11 Oct 2011 at 8:59am
when you say "in Crystal" where are you using this?
in a command or in the select expert or somewhere else?
Note that that the LIKE function crystal uses * as the wildcard rather than % (sql).
so if you are using it in a formula or a select expert in crystal it has to be
table.id like '9
*
'
if you were writing a crystal command it still uses SQL so you woud stay with the %
Edited by DBlank - 11 Oct 2011 at 9:23am
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.