Solved

How to filter segments of text in Crystal 2008

Posted on 2011-09-07
5
208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 101

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 101

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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 …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

627 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