I have been doing this for years with plain text and it works Great.  Then I
decided it would be cool to add bold and red text to the notes and I bit off 
more than I can chew.

My goal is to get some formatted text from a Varchar column that is stored
in a lookup table such as this

[Fname] was instructed to put Ice on his ankle ....
Warning  do not freeze your foot 

Do a SRPL to change [Fname] to  .vFname ...and a few more SRPL's
then add that to the end of the patient notes which are stored in a Varchar 
column.
The patient notes in the Varchar field may already have Bold or red text too

I believe you can SRPL plain text for plain text in a Varchar column even if it 
has bold and red text?
At least the limited testing I did seemed to work.  

Thanks
Marc







--------------------------------------------------
From: "MikeB" <[email protected]>
Sent: Thursday, July 16, 2009 9:54 AM
To: "RBASE-L Mailing List" <[email protected]>
Subject: [RBASE-L] - Re: VarChar Data and RTF

> You have never specified the original "source" of the RTF.  That's why I 
> listed how to join them, no matter the source.  If the text that is stored 
> contains formatting, _including_ BOLD or FONT, then my description applies. 
> If it only contains CRLF, then it is plain text.  If the data isn't 
> sensitive, why don't you show two sources you are trying to combine so we 
> can go from there?
> 
> ----- Original Message ----- 
> From: "MDRD" <[email protected]>
> To: "RBASE-L Mailing List" <[email protected]>
> Sent: Thursday, July 16, 2009 9:01 AM
> Subject: [RBASE-L] - Re: VarChar Data and RTF
> 
> 
>> Mike
>>
>> I hope I do not have everyone mixed up on what I am trying to do?
>> You may know this already but I am trying to combine 2 Varchar
>> columns with formatted data.  I am not really joining files.  My code
>> sets the lookup Varchar data to a Variable then Updates the other Table.
>>
>> It seems that Varchar variables only hold raw text and can not hold Bold 
>> or red text
>> without converting it to the formatting gibberish and that gibberish 
>> breaks the Update
>> command.
>>
>> Thanks for all the help
>> Marc
>>
>>
>>
>>
>> --------------------------------------------------
>> From: "MikeB" <[email protected]>
>> Sent: Wednesday, July 15, 2009 5:51 PM
>> To: "RBASE-L Mailing List" <[email protected]>
>> Subject: [RBASE-L] - VarChar Data and RTF
>>
>>> Marc,
>>>
>>>  Now that I've refreshed my memory a bit on RTF, it seems like there is 
>>> likely an all RBase way of concatenating RTF with at least a couple of 
>>> major hurdles.  Now it is true this could be an all RBase solution, but 
>>> as you will read below, it could become cumbersome to the point that it 
>>> should be done in a DLL for speeds sake.
>>>
>>>  One biggie would be that the originating RTF isn't from a recent version 
>>> of Word.  I looked at the difference in the RTF from WordPad and the same 
>>> document saved in Word and word has over a hundred lines of crap after 
>>> the "legal RTF" document description that relates to the Theme (meta) 
>>> data from Word.
>>>
>>> The second, is you have to be prepared to programatically manipulate the 
>>> Font Table.  The font table "{\fonttbl" is created with the documents 
>>> default font as "\f0" and with the first change after that "\f1" and so 
>>> on in that fashion, so if the merged document has the same fonts, but 
>>> were created in a different order, the lookup for the font to apply for 
>>> the text in the font table will display an incorrect font, so merged RTF 
>>> has to have any disparate (non existing) font added to the base 
>>> document's Font Table, and the sequencing of the font markup changed to 
>>> match the order of the Font Table
>>>
>>> Now for the structure of the RTF.
>>>
>>>  It appears that when there is a complete "file" or document description, 
>>> the document header line ends in a CRLF, so to determine if the VarChar 
>>> data is just a snippet or a complete document, you need to test for the 
>>> presence of expected text in the header, the most obvious is the first 5 
>>> characters of the file "{\rtf", with the 6th character being the version 
>>> of the RTF (1 through 4).
>>>
>>> So if you test for the headers presence and it is TRUE, then to add 
>>> another snippet to it, we need to remove the LAST character of the file, 
>>> which is the last closing brace "}" , then you can concantenate your 
>>> snippet to it, ADD back the closing brace "}" and you have a complete 
>>> file.
>>>
>>> If you are merging TWO Files together, you would remove the header from 
>>> the second file (after removing the closing brace from the first) and 
>>> simply concantenate the remainder of the second file to the first 
>>> (observing what has to happen to the font table as described before).
>>>
>>> HTH,
>>>
>>> Mike
>>>
>>>
>>>
>>>
>>
>> 
> 
>

Reply via email to