Recent

Author Topic: Print TMemo with Lazreport  (Read 3665 times)

lco

  • Newbie
  • Posts: 4
Print TMemo with Lazreport
« on: February 06, 2016, 03:23:22 pm »
Hello,
Can somebody help me how to print the contents of TMemo with Lazreport,
as well as with pascal code
I prefer Lazreport

Thanks

balazsszekely

  • Guest
Re: Print TMemo with Lazreport
« Reply #1 on: February 06, 2016, 03:55:09 pm »
1. Drop a TButton and a TfrReport to your form. Make sure StoreInform property is set to true.
2. Double click TfrReport, after the designer appears, drop a Rectangle object to the desinger, rename it to Memo1
3. Close the designer, click to report, create OnEnterRect event. Paste this code:
Code: Pascal  [Select][+][-]
  1. procedure TForm1.frReport1EnterRect(Memo: TStringList; View: TfrView);
  2. begin
  3.   if (View is TfrMemoView) then
  4.    if (View as TfrMemoView).Name = 'Memo1' then
  5.      (View as TfrMemoView).Memo.Text := 'test test test';
  6. end;
4. On Button1 click:
Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. begin
  3.   frReport1.ShowReport;
  4. end;

 

TinyPortal © 2005-2018