Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Lines every 4 records

edited August 2006 in General
Hello

i want a report where a horizontal line is every 4 records.
How can i do that.
Met vriendelijke groet, With kind regards,


Frank Beerens

Comments

  • edited August 2006
    Hi Frank,

    Try placing a line inside the detail band with its ParentWidth property set
    to True and its Visibility set to False. Then inside the
    DetailBand.BeforePrint event, toggle the visibility of the line based on the
    band count. Something like the following...

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    FTotalCount := 0;
    end;

    procedure TForm1.ppDetailBand1BeforePrint(Sender: TObject);
    var
    liCount: Integer;
    begin

    liCount := FTotalCount + ppReport1.DetailBand.Count + 1;

    if (liCount mod 4 = 0) then
    ppLine1.Visible := True
    else
    ppLine1.Visible := False;
    end;

    procedure TForm1.ppReport1EndPage(Sender: TObject);
    begin
    FTotalCount := FTotalCount + ppReport1.DetailBand.Count;
    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.