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

Replace in a Memo Field

Status
Not open for further replies.

mdtimo

Programmer
Oct 18, 2001
38
0
0
US
I have a memo field that displays serval lines worth of data, hard returns are identified as the character "`", with similar fields I had used a formula to replace "`" with chr(13) but this formula won't work on this memo field. I am using CR 8.5 and know this works on 9.0. Any idea how to get this to work on 8.5?
 
Use a SQL Expression (Insert->Field Object->Right click SQl Expression and select New->Name it, you can then use native SQL (using the SQL Server dirver):

REPLACE(somefield,char(39) ,char(13))

-k

 
For whatever reason SQL expression is not available.

Could it because the data is in a stored procedure, or could it because this is a subreport?

I see SQL expressions as a choice in other reports.
 
Ahh, because it's an SP, you'll should alter the SP to do this.

Consider psoting technical information in the first post to avoid subsequent discovery.

-k
 
It's because of the stored procedure... SQL Expressions aren't an option when using stored procs. You could handle it like this in the proc:

REPLACE(CAST(MemoField AS VARCHAR(1000)),'`',CHAR(13))

-dave
 
Using the replace in the stored procedure worked like a charm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top