Board index » delphi » Cannot get RichText (or text) displayed in Datamemo in Rave Report

Cannot get RichText (or text) displayed in Datamemo in Rave Report


2006-07-17 12:23:26 PM
delphi13
Hi
I have tried to print richText(or text) to datamemo in rave report using the following code:
/////////////////////////////////////////////////
procedure TForm1.Button1Click(Sender: TObject);
var
MyPage : TRavePage;
MyMemo : TRaveDataMemo;
begin
RvProject1.Open;
try
MyPage := RvProject1.ProjMan.FindRaveComponent('Report1.Page1', nil) as TRavePage;
MyMemo := RvProject1.ProjMan.FindRaveComponent('DataMemo1',MyPage) as TRaveDataMemo;
MyMemo.ContainsRTF := true;
MyMemo.Text := RichEdit1.lines.text;
RvProject1.Execute;
finally
RvProject1.Close;
end;
end;
/////////////
However, I got nothing shown in my report.
And I tried a similar way by using the memo instead:
///////////////
procedure TForm1.Button1Click(Sender: TObject);
var
MyPage : TRavePage;
MyMemo : TRaveMemo;
begin
RvProject1.Open;
try
MyPage := RvProject1.ProjMan.FindRaveComponent('Report1.Page1', nil) as TRavePage;
MyMemo := RvProject1.ProjMan.FindRaveComponent('Memo1',MyPage) as TRaveMemo;
MyMemo.ContainsRTF := true;
MyMemo.text := RichEdit1.Lines.Text;
RvProject1.Execute;
finally
RvProject1.Close;
end;
end;
/////////////////////
I only got plain text showm in my report.
Can anybody tell me how to get the RichText displayed in Datamemo in Rave report?
Cheers
Jason
 
 

Re:Cannot get RichText (or text) displayed in Datamemo in Rave Report

this should work:
GetMem(Buffer, Length(Memo1.Text) + 1);
StrCopy(Buffer, PChar(Memo1.Text));
MyMemo.Text := Buffer;
FreeMem(Buffer);
:-) thomas
<Jason jason-liuActrix.co.nz>schrieb im Newsbeitrag
Quote

Hi
I have tried to print richText(or text) to datamemo in rave report using
the following code:

/////////////////////////////////////////////////
procedure TForm1.Button1Click(Sender: TObject);
var
MyPage : TRavePage;
MyMemo : TRaveDataMemo;
begin
RvProject1.Open;
try
MyPage := RvProject1.ProjMan.FindRaveComponent('Report1.Page1', nil) as
TRavePage;
MyMemo := RvProject1.ProjMan.FindRaveComponent('DataMemo1',MyPage) as
TRaveDataMemo;
MyMemo.ContainsRTF := true;
MyMemo.Text := RichEdit1.lines.text;
RvProject1.Execute;
finally
RvProject1.Close;
end;
end;
/////////////

However, I got nothing shown in my report.

And I tried a similar way by using the memo instead:
///////////////
procedure TForm1.Button1Click(Sender: TObject);
var
MyPage : TRavePage;
MyMemo : TRaveMemo;
begin
RvProject1.Open;
try
MyPage := RvProject1.ProjMan.FindRaveComponent('Report1.Page1', nil) as
TRavePage;
MyMemo := RvProject1.ProjMan.FindRaveComponent('Memo1',MyPage) as
TRaveMemo;
MyMemo.ContainsRTF := true;
MyMemo.text := RichEdit1.Lines.Text;
RvProject1.Execute;
finally
RvProject1.Close;
end;

end;
/////////////////////
I only got plain text showm in my report.

Can anybody tell me how to get the RichText displayed in Datamemo in Rave
report?

Cheers
Jason