Strong Report running Trlband more than once

Asked

Viewed 14 times

0

I have a Fort Report, inside it I have a Trlband with bandType = btDetail, in the Beforeprint I have the following code:

procedure TFRel_QualidadeFomento.RLBand2BeforePrint(Sender: TObject;
 var PrintIt: Boolean);
begin
    label1.text := queryNomePessoa.text;
   if (countPrimeiraParte < 12) then
      query.Prior;
   countPrimeiraParte := countPrimeiraParte + 1;
end;

In this situation the band2 is executed 12 times, printing the name in 12 lines. This works when I have more than one record in my query, now if I have only one record, band2 runs only once. Does anyone know why? What if there is some way for the band2 to be executed more than once when it has only one record?

I tried to add RLBand2BeforePrint(Self,PrintIt); even calls Rlband2 12 times, but there is no line break, only one line with the last query name appears at the end.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.