Recent

Author Topic: lazreport - Is it possible to repeatedly print a number of records in LazReport  (Read 1850 times)

adilsonpazzini

  • New Member
  • *
  • Posts: 29
Is it possible to repeatedly print a number of records in LazReport?
for example, print 3 times the same record.

Cod.Parts   Description       $
00000001  AMORTECEDOR 10,00
00000001  AMORTECEDOR 10,00
00000001  AMORTECEDOR 10,00
00000002  BATERIA           11,00
00000002  BATERIA           11,00
00000002  BATERIA           11,00


Thank you very mach in advance .

Adilson Pazzini .

balazsszekely

  • Guest
I assume you have a master or detail band, on it a memo. The band is linked to a query. You also have an OnEnterRect event for the frReport:
Code: Pascal  [Select][+][-]
  1. procedure TForm1.frReportEnterRect(Memo: TStringList; View: TfrView);
  2. begin
  3.   if (View is TfrMemoView) then
  4.   begin
  5.     if (View as TfrMemoView).Name = 'MyMemo' then
  6.     begin
  7.      //you can add other conditions here
  8.       (View as TfrMemoView).Memo.Text := qMyQuery.FieldByName('MyField').AsString + sLineBreak +
  9.                                          qMyQuery.FieldByName('MyField').AsString + sLineBreak +
  10.                                          qMyQuery.FieldByName('MyField').AsString;
  11.     end;
  12.   end;
  13. end;
  14.  
You should change MyMemo, qMyQuery, MyField and you're good to go.

adilsonpazzini

  • New Member
  • *
  • Posts: 29
I thought maybe there was some property for that.

Thank you so much

 

TinyPortal © 2005-2018