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!

a string can be at most 65534

Status
Not open for further replies.

mike808

MIS
Sep 29, 2015
1
NZ
Hi,

I am using CR 2008, during formula check, it doesn't show any error, however, at runtime, i get the string ... error.

Please check the below code:

1: Notes_HTML_Text is a memo datatype in my db.

-------------------------------------------------------------------------------------------

stringvar HTMLnote := {Notes_Master_EXT.Notes_HTML_TEXT};
stringVar colon;
NumberVar intPosition := InStr(HTMLnote, ">");



HTMLnote := Replace(HTMLnote, "<P>", "<BR>");
HTMLnote := Replace(HTMLnote, "</P>", "</BR>");

If Instr({Notes_Master_EXT.Notes_NOTE_DESC}, ":") > 0 Then
colon := " "
else
colon := ": ";

IF inStr(htmlnote, "<FONT") > 0 Then
(
if trim({Notes_Master_EXT.Notes_NOTE_DESC}) = "" then
"<FONT style='font-size: 8pt'>" & HTMLnote & "</FONT>"
else
If intPosition > 0 Then
"<FONT style='font-size: 8pt'>" & Left(HTMLNote, intPosition) & Trim({Notes_Master_EXT.Notes_NOTE_DESC}) & colon & Mid(HTMLnote, intPosition + 1) & "</FONT>"
Else
"<FONT style='font-size: 8pt'>" & Trim({Notes_Master_EXT.Notes_NOTE_DESC}) & colon & HTMLnote & "</FONT>";
)
Else
(
if trim({Notes_Master_EXT.Notes_NOTE_DESC}) = "" then
HTMLnote
else
If intPosition > 0 Then
Left(HTMLNote, intPosition) & Trim({Notes_Master_EXT.Notes_NOTE_DESC}) & colon & Mid(HTMLnote, intPosition + 1)
Else
Trim({Notes_Master_EXT.Notes_NOTE_DESC}) & colon & HTMLnote;
)





----------------------



Please advise.

Thanks in advance...

Mike
 
I am assuming that the field you are trying to use is longer than 65534 characters long (which of course Crystal would not know until you run the code). That is a hard limit and I do not know any way around it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top