Solved

How to filter segments of text in Crystal 2008

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

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 …
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

770 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