Question
“How can I print X number of labels for each record?”
Solution
This example shows how to use the DetailBand.BandsPerRecord property to print X number of labels for each record.
Download: RepeatLabels.zip
Sample Delphi code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
procedure TForm1.ppDetailBand1BeforePrint(Sender: TObject); var liCount: Integer; begin {check BandsPerRecordCount, it resets to 1 when all bands for the prior record have gemerated } if (ppDetailBand1.BandsPerRecordCount = 1) then begin liCount := Round(ppReport1.DataPipeline['CustNo'] div 1000); ppDetailBand1.BandsPerRecord := liCount; end; // show a counter next to each label ppLabel4.Caption := IntToStr(ppDetailBand1.BandsPerRecordCount); end; |