Solved

Using a Wildcard with a Parameter

Posted on 2009-05-20
7
384 Views
Last Modified: 2012-05-07
I am writing a report that will generate a list of survey recipients.  I have two parameters setup: one for the bank acronym and one for job title.  My problem is that, if the user enters only "Teller" in the parameter, it will only return Tellers.  However, there are job titles like Teller Supervisor and FSR/Teller that should also be returned.  I have tried using {Imaging.job_code} like "*{?Job Title}*" but no results are returned with this.  What other way can I use a wildcard with this parameter to get what I'm needing?


{@Status} = "A" and
not isnull ({Imaging.NovellID}) and
{@JobTitle} and
(if {?Bank Acronym} = "*" then true
    else {@Bank} = {?Bank Acronym}) and
{Imaging.job_code} like {?Job Title}

Open in new window

0
Comment
Question by:tpomeroy
[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
  • 4
  • 3
7 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 125 total points
ID: 24433523
Try

{Imaging.job_code} like "*" & {?Job Title} & "*"

mlmcc
0
 

Author Comment

by:tpomeroy
ID: 24433565
When I used this, I received this error message:  "This array must be subscripted.  For example: Array [i]."
error.bmp
0
 

Author Comment

by:tpomeroy
ID: 24433686
Okay, I changed the "allow multiple values" in the parameter to False and the error went away.  However, the users really need the ability to enter multiple job titles.  Anyway around that?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 100

Expert Comment

by:mlmcc
ID: 24434107
Not easily that I can think of.

Can you populate the parameter with valid values so they can choose all the ones they want?

mlmcc
0
 

Author Comment

by:tpomeroy
ID: 24434541
I could but there are hundreds of them.  I will try that, though.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 24435011
You can use the ability to add them from the table rather than having to add them.

If the user enters *Teller* as a value along with another value does it work if you use

{ReportField} LIKE {?Param}

mlmcc
0
 

Author Comment

by:tpomeroy
ID: 24435121
No it does not.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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 …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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