INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Filter a record

Filter a record

(OP)
Challenge with applying a simple filter. I have a report that I want filter out all records where a field contains the letter "L"

RE: Filter a record

One way - In your Selection Criteria, add:

instr(ucase({yourField}),"L") = 0

RE: Filter a record

(OP)
The first two lines are:
instr(ucase({job.CCMasterID}),"L")=0 and
{job.CCMasterID} in {?BegJob} to {?EndJob} and

The report is still bringing in those with an L


RE: Filter a record

You said you wanted to filter out records with an "L", not include them. Change instr(ucase({job.CCMasterID}),"L")=0 to instr(ucase({job.CCMasterID}),"L<>0

RE: Filter a record

AndyMc's code is correct.

You say "... the first two lines are". Please post the complete Record Selection Formula - is there an OR in it somewhere?

Pete

RE: Filter a record

(OP)
Kray--did not help
Pete/Andy--here is the code. This code is in an existing report, I just want to not include and records if the MasterID fields contains an L

instr(ucase({job.CCMasterID}),"L")=0 and
{job.CCMasterID} in {?BegJob} to {?EndJob} and
{jobcost.JCChargeClass} = 9 and
(({job.ccdatesetup} <= {?AsOfDate} and cstr({jobstatus.ccopenjob})="true" and
{jobcost.jcstartdate}<={?AsOfDate} and cstr({jobstatus.jcchargesok})="true")
or
(cstr({jobstatus.ccopenjob})="false" and {jobpart.ccinvoicedate}>{?AsOfDate} and
{job.ccdatesetup} <= {?AsOfDate} and {jobcost.jcstartdate}<={?AsOfDate} and
cstr({jobstatus.jcchargesok})="true"))
and
{jobcost.posted} =true

RE: Filter a record

As I suspected, it will be the OR that is causing your problem. I am assuming that it is just the first line that you are adding, so would simply 'bracket' the existing code, like this:

CODE

instr(ucase({job.CCMasterID}),"L")=0 and
(
    {job.CCMasterID} in {?BegJob} to {?EndJob} and
    {jobcost.JCChargeClass} = 9 and
    (
        (   
            {job.ccdatesetup} <= {?AsOfDate} and cstr({jobstatus.ccopenjob})="true" and
            {jobcost.jcstartdate}<={?AsOfDate} and cstr({jobstatus.jcchargesok})="true"
        )
        or
        (
            cstr({jobstatus.ccopenjob})="false" and {jobpart.ccinvoicedate}>{?AsOfDate} and
            {job.ccdatesetup} <= {?AsOfDate} and {jobcost.jcstartdate}<={?AsOfDate} and
            cstr({jobstatus.jcchargesok})="true"
        )
    )   and {jobcost.posted} =true
) 

Hope this helps.

Cheers
Pete

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close