Solved

How to filter segments of text in Crystal 2008

Posted on 2011-09-07
5
195 Views
Last Modified: 2012-05-12
My filtering based on the previous question has changed and for some reason I am unable to figure out how to tweak this formula to make the filter do what I need.

Basically, I need to now filter out any employee ID that starts with 804 or contains 804. I also need to filter out any Emp Ids that have an 'S' as the last character in the string.. e.g. 12S, 134S, 2S. Based on my information this part of the filter can basically filter out any ID that contains an 'S'.

Thanks a bunch for the help.. I thought the formula I had changed would work fine for this..  (Here is what I tried;)

Right({BAQReportResult.EmpBasic.EmpID},1) <> 'S'
or
{BAQReportResult.EmpBasic.EmpID} <> '*804*'


I tried a few other variations but nothing seems to be working..
0
Comment
Question by:SeyerIT
  • 2
  • 2
5 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 36499296
Try it this way

Right({BAQReportResult.EmpBasic.EmpID},1) <> 'S'
AND
{BAQReportResult.EmpBasic.EmpID} <> '*804*'

Unless you have 804S it will always not equal one of them

mlmcc

0
 
LVL 19

Accepted Solution

by:
GJParker earned 500 total points
ID: 36501190

This should do the trick and will always be passed to the db in the SQL where clause

Not({BAQReportResult.EmpBasic.EmpID} Like '*S')
AND
Not({BAQReportResult.EmpBasic.EmpID} Like  '*804*')

HTH

0
 
LVL 2

Author Closing Comment

by:SeyerIT
ID: 36502224
Mlmcc, the method you posted was actually the last method I had before I quit trying.. To me, this should have worked but didn't. I thought I understood this filtering correctly but something about that formula (or any of the other ones I seemed to be trying) just wasn't working..

This other formula using "like" did the trick though.

Thanks for both of your guys' help though! I really appreciate it. This one was going to drive me crazy!
0
 
LVL 19

Expert Comment

by:GJParker
ID: 36502517
= and <> don't use wildcard characters so <> '*804*'will pull back everything that doesn't eaxctly match the search string, that's why you need to use the Like operator
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 36502753
I saw you needed AND and didn't look at the rest.  The RIGHT part works it is the LIKE that was needed.

mlmcc
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now