Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Startswith in Crystal

Posted on 2014-08-12
2
Medium Priority
?
84 Views
Last Modified: 2015-01-29
Hi there,
I'd like to consolidate my coding and currently have:

or Not Isnull ({CnGf_1AttrCat_1.CnGf_1AttrCat_1_Import_ID})
and {CnGf_1AttrCat_1.CnGf_1AttrCat_1_Comments} startswith "K12-"
or Not Isnull ({CnGf_1AttrCat_1.CnGf_1AttrCat_1_Import_ID})
and {CnGf_1AttrCat_1.CnGf_1AttrCat_1_Comments} startswith "K17-"
or Not Isnull ({CnGf_1AttrCat_1.CnGf_1AttrCat_1_Import_ID})
and {CnGf_1AttrCat_1.CnGf_1AttrCat_1_Comments} startswith "K18-"

Is there are something similar to the "in" function that will allow me to say
Not Isnull ({CnGf_1AttrCat_1.CnGf_1AttrCat_1_Import_ID})
and {CnGf_1AttrCat_1.CnGf_1AttrCat_1_Comments} in (startswith ["K12-" , "K17", "K18"]) just to consolidate it to make it easier for future reference?

Thanks in advance,
CS
0
Comment
Question by:rporter45
2 Comments
 
LVL 23

Accepted Solution

by:
Ido Millet earned 1000 total points
ID: 40256626
Try
(Not Isnull ({CnGf_1AttrCat_1.CnGf_1AttrCat_1_Import_ID}) AND (
  {CnGf_1AttrCat_1.CnGf_1AttrCat_1_Comments} startswith "K12-" OR
  {CnGf_1AttrCat_1.CnGf_1AttrCat_1_Comments} startswith "K17-" OR
  {CnGf_1AttrCat_1.CnGf_1AttrCat_1_Comments} startswith "K18-" ))

But for better performance, consider creating and using an SQL Expression that grabs the first 4 characters.
0
 

Author Comment

by:rporter45
ID: 40256711
Now that sounds better! I will try and get back to you - I have been staring at this way too long,

take care,
CS
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month21 days, 6 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question