trichview.support
Re: Multiple lines in one RVData.SetItemText(i, value) |
Author |
Message |
Anderson Wilson |
Posted: 06/16/2005 18:59:05 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