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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter on Memo Field 1

Status
Not open for further replies.

Jazztpt

Vendor
Feb 16, 2005
50
Hi - I need to filter my report by the word "Booking" in a memo field
but the select expert tells me I can't use formulas on a memo field. Is there another way of achieving this?
Using ver 8.5
Thanks
Jazztpt
 
Don't use the select expert, instead manually type the field in the record selection formula as follows:

instr({MyMemoField},"BOOKINGS")>0



Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Thanks for your reply dgillz. I still get the message that I can't use blob and memo fields in a formula. I found some other threads that suggest using an SQL query to find the word but not 100% sure how to do this, the sample I tried didn't work - same message re blob & memo fields.
Thanks
Jazztpt
 
Use a SQL expression:

(substr(table.`field`,1,254))

...where the 1 is the position of the starting character, and 254 = the length of the string. If the memo can be longer, then use two SQL expressions where the second one looks like:

(substr(table.`field`,255,254))

Drop them into a text box so that the text is continuous.

To search the string, you can use a record selection formula like:

{%memo1} like "*Booking*" or
{%memo2} like "*Booking*"

This assumes that "Booking" always appears with a leading cap--otherwise you might want to change the substr to uppercase:

(ucase(substr(table.`field`,1,254)))

...and then use "BOOKING" in the record selection formula.

-LB
 
Thansk for the help - I will check out tomorrow and get back if I need more help.
Jazztpt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top