Solved

How to filter segments of text in Crystal 2008

Posted on 2011-09-07
5
192 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 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

11 Experts available now in Live!

Get 1:1 Help Now