Einzelnen Beitrag anzeigen

merlin17

Registriert seit: 15. Dez 2002
Ort: Mittelfranken
980 Beiträge
 
Delphi 10 Seattle Enterprise
 
#2

Re: Edit-Text in Rave-Text anzeigen

  Alt 21. Mai 2007, 17:56
Hallo,

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
   MyPage : TRavePage;
   MyText : TRaveText;
   MyMemo : TRaveMemo;
   MyBitmap : TRaveBitmap;
   Buffer : PChar;
begin
   RvProject1.Open;
   with RvProject1.ProjMan do begin
        // Look for components we want to update
        MyPage := FindRaveComponent('RepThomas.Page1', nil) as TRavePage;
        MyText := FindRaveComponent('Text1', MyPage) as TRaveText;
        MyMemo := FindRaveComponent('Memo1', MyPage) as TRaveMemo;
        MyBitmap := FindRaveComponent('Bitmap2', MyPage) as TRaveBitmap;
        // Modify Text and font color of 'Text2' in report
        MyText.Text := 'Hallo Delphi-Praxis.net!';
        MyText.Color := clRed;

        // Typecasting of Delphi Memo1 into RaveMemo language
        GetMem(Buffer,Length(Memo1.Text) + 1);
        StrCopy(Buffer, PChar(Memo1.Text));
        MyMemo.Text:=Buffer;
        FreeMem(Buffer);
        // Assignation of Delphi Image1 to Rave Bitmap
        MyBitmap.Image.Assign(Image1.Picture.Bitmap);
   end;
   RvProject1.ExecuteReport('RepThomas');
   RvProject1.Close;
end;
aber evtl. ist der Weg über Parameter bzw. CustomConnection einfacher/sinnvoller......

-take care


thomas, TeamNevrona
- TeamNevrona cannot respond to questions received via email -
http://rave-notes.blogspot.com
  Mit Zitat antworten Zitat