cancel
Showing results for 
Search instead for 
Did you mean: 

How can I run a report by capturing a specific word or phrase

Former Member
0 Kudos

I'm trying to create a Crystal Report to run against my HEAT Call Logging system.

What I am trying to do is create a formula that will return only call tickets that have a specific word or phrase in a certain field.

For example, I would like the formula to find all call tickets with the words Work Order in the Ticket Title.

The Formula I have come up with is as follows...

({CallLog.TicketTitle} like "?ork ?rder" or

{CallLog.TicketTitle} like "?ORK ?RDER" or

{CallLog.TicketTitle} like "WO *" or

{CallLog.TicketTitle} like "wo *")

I tried to capture other possible ways that Work Order my have been typed in.

The results I get back include everything I'm looking for, however, it also includes things I'm not looking for such as 'two' because my like statement above {CallLog.TicketTitle} like "wo *".

Any ideas on how I can get only the word or words I am wanting in my report would be greatly appreciated.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You may need to add a space before the WO:


" " + {CallLog.TicketTitle} like " WO *" 

HTH,

Carl

Former Member
0 Kudos

This seemed to take care of it. Can I ask, what does the " " + in front of {CallLog.TicketTitle} like " WO *" do?

Former Member
0 Kudos

Checking to see if it is like " WO " to prevent "two " from matching would mean that if the description started with "WO " it would not match. Adding a space at the start of the description fixes this issue. Does that clarify it?

HTH,

Carl

Former Member
0 Kudos

I understand the space in front of " WO", but what does the " " + at the beginning used for?

Former Member
0 Kudos

if the description started with "WO " it would not match. Adding a space at the start of the description [with " " +] fixes this issue.

HTH,

Carl

Edited by: Carl Sopchak on Apr 21, 2010 12:44 PM - fixed brackets in edited quote

Former Member
0 Kudos

Much clearer, thanks.

Answers (1)

Answers (1)

Former Member
0 Kudos

like "work order"

should work fine,

I do not think CR looks at the case