Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bring up records based on a part of a string

Status
Not open for further replies.

tawild71

MIS
Jul 20, 2010
10
US
I have a Crystal Report that I am trying to bring up records based on the CallEventLog field in a table on a SQL Server 2005 Database. The CallEventLog field is varchar(2000).

In the Crystal Report, I will be pulling records by...

Beginning and Ending Date and
Hold Duration (in seconds) > 900 (15 min) and
CallDirection = "Inbound" (Inbound Calls only) and
CallEventLog in Trim("%held call timeout%")

I have verified that the stirng of "held call timeout" is a part of the CallEventLog Column for some of the records by running it as a query in SQL Server 2005.

select * from calldetail where initiateddate > '2010-8-1' and initiateddate < '2010-11-1'
and calleventlog like '%held call timeout%' -- The client's call timed out to reach the IVR menu
and calldirection = 'Inbound' and holddurationseconds > 900

There were different variations of CallEventLog in Trim("%held call timeout%") I have tried. Such as...

CallEventLog in ["*held call timeout*"]
CallEventLog = ("%held call timeout%")

I commented out the CallEventLog in Trim("%held call timeout%") and the report populated with data. That was good and all but that did not acheive my objective. There is something missing in that statement or I'm not doing? Your help would be most appreciated.









 
If you are using the CR interface record selection area, then you should be able to use:

{table.CallEventLog} like "*held call timeout*"

If case is a factor, use:

ucase({table.CallEventLog}) like "*HELD CALL TIMEOUT*"

...or better yet use a SQL expression {%calleventlog}:

{fn ucase("table"."CallEventLog")}

...and then use:

{%calleventlog} like "*HELD CALL TIMEOUT*"

If you are using a command, you would have to use "%" instead of the asterisk ("*").

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top