trichview.support
Re: Multiple lines in one RVData.SetItemText(i, value) |
Author |
Message |
Jim Maguire |
Posted: 06/17/2005 0:33:58 It seems that if I have a Blob field containing multiple lines of text, that I must insert one line at a time after deleting my form field. Is there a better way, like doing an automated "paste" or putting some HTML tags around the blob text and inserting that? "Jim Maguire" <jimmaguire@cox.net> wrote in message news:42b1f1bc$1@support.torry.net... > Thanks, that explains it. I assumed the data field was a blob field > containing raw text, but just looked at it in DBD. So now I'm back to > square one on inserting multiple lines of text at one time. Do you have > any suggestions? > > "Anderson Wilson" <adwilson@terra.com.br> wrote in message > news:42b1a7a0$1@support.torry.net... >> Jim, >> >> When you say is the same, you are wrong, because the field Data is a >> BINARY field containg a rvf file format and NOT A STRING. >> >> So when you change the content of the memorystream with a string the >> method InsertRVFFromStream doesn't work! >> >> Anderson >> >> Jim Maguire wrote: >>> Thanks, but that's not it. Here's an easy way to reproduce the problem: >>> >>> 1. Open the MailMerge2 demo >>> 2. Comment out the >>> TBlobField(Table1.FieldByName('Data')).SaveToStream(Result); >>> 3. Insert these lines instead: >>> >>> var str: String; >>> .... >>> str := 'Insert this text in RVE'; >>> Result.WriteBuffer(PChar(str)^, Length(str)); >>> Result.Position := 0; >>> >>> //TBlobField(Table1.FieldByName('Data')).SaveToStream(Result); >>> >>> So now the only difference is I'm alway returning the TMemoryStream with >>> the same string. >>> >>> "Anderson Wilson" <adwilson@terra.com.br> wrote in message >>> news:42b19e5c@support.torry.net... >>> >>>>Hi Jim, >>>> >>>>I believe I found your problem. >>>> >>>>You create a Stream containing a string not a RVF file and then you use >>>>RichView2.InsertRVFFromStream method that EXPECTS an RVF format not a >>>>string. >>>> >>>>I hope this help you >>>> >>>>Anderson >>>> >>>>extracted from MemoMergeProblem.zip >>>> >>>> StringStream := TStringStream.Create('This is the first line'); >>>> StringStream.Position := 0; >>>> RichEdit1.Lines.LoadFromStream( StringStream); // load stream contents >>>> into memorich >>>> >>>> Result.LoadFromStream(StringStream); >>>> >>>> //TBlobField(Table1.FieldByName('Data')).SaveToStream(Result); >>>> Result.Position := 0; >>>> RichView2.Clear; >>>> RichView2.InsertRVFFromStream(Result, 0); // inserting will merge >>>> styles; >>>> // RichView1 and RichView2 have the same collections of styles >>>> >>>> >>>> > > |
Powered by ABC Amber Outlook Express Converter