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

Detailband Before Print

edited August 2007 in General
i am doing a before print on a detail band and tryin to resize the detail
band depending on some variables in the record. For some reason when i set
the height value on the fly it doesn't seam to want to work. any
suggestions.

Comments

  • edited August 2007
    what does your code look like?

    --
    Ed Dressel
    Team DM
  • edited August 2007
    case NumItem of
    1 : begin
    dbOrderUnit2.Visible := False;
    dbCount2.Visible := False;
    dbCost2.Visible := False;
    dbVendorCode2.Visible := False;

    dbOrderUnit3.Visible := False;
    dbCount3.Visible := False;
    dbCost3.Visible := False;
    dbVendorCode3.Visible := False;

    ppLine3.Top := 0.4687;
    ppDetailBand2.Height := 0.51;
    end;
    2 : begin
    dbOrderUnit3.Visible := False;
    dbCount3.Visible := False;
    dbCost3.Visible := False;
    dbVendorCode3.Visible := False;

    dbOrderUnit2.Visible := True;
    dbCount2.Visible := True;
    dbCost2.Visible := True;
    dbVendorCode2.Visible := True;

    ppLine3.Top := 0.6875;
    ppDetailBand2.Height := 0.73;
    end;
    3 : begin

    dbOrderUnit2.Visible := True;
    dbCount2.Visible := True;
    dbCost2.Visible := True;
    dbVendorCode2.Visible := True;

    dbOrderUnit3.Visible := True;
    dbCount3.Visible := True;
    dbCost3.Visible := True;
    dbVendorCode3.Visible := True;

    ppLine3.Top := 0.9167;
    ppDetailBand2.Height := 0.95;
    end;
    end; { case }

  • edited August 2007
    sorry for the late response--on vacation.

    Attached is a simple demo that users RAP. If you don't have RAP, in the
    detail.BeforePrint use the following code (modify it so that it will work):

    Shape1.Brush.Color := plData['Color'];
    Report.Detail.Height := plData['Height'];
    Shape1.Height := plData['Height'];


    This should work for you.
    --
    Ed Dressel
    Team DM
This discussion has been closed.