Class: TBandItem

TComponent ----+
            |
        TBandItem

Description:

Unit:
UCWReport (UCWReport.pas)

Constructors:

constructor Create(AOwner: TComponent);override;
constructor Create(AOwner: TComponent);override;

Propertys:

property PosRect: TRect read GetPosRect;
property NextRect: TRect read GetNextRect;
property PrevGroupByFieldValue: String Read FPrevValue;
property TopLeft: TPoint read GetTopLeft write SetTopLeft;
property BandType: TBandType read FBandType write SetBandType;
property Dataset: TDataset read FDataset write SetDataset;
property Copies : Integer read FCopies write SetCopies default 1;
property Columns: Integer read FColumns write SetColumns;
property RowSpace: Integer read FRowSpace write SetRowSpace;
property ColumnSpace: Integer read FColumnSpace write SetColumnSpace;
property ParentBand: TCWBand read FParentBand write SetParentBand;
property GroupByExpr: string read FGroupByExpr write SetGroupByExpr;
property Jump: Boolean read FJump write SetJump;
property BeforePrint: TCWBandPrintEvent read FBeforePrint write FBeforePrint;
property AfterPrint: TCWBandPrintEvent read FAfterPrint write FAfterPrint;
property BeforePaint: TCWBandPaintEvent read FBeforePaint write FBeforePaint;
property AfterPaint: TCWBandPaintEvent read FAfterPaint write FAfterPaint;
property BeforeCalculate: TCWBandBeforeCalculateEvent read FBeforeCalculate write FBeforeCalculate;
property AfterCalculate: TCWBandAfterCalculateEvent read FAfterCalculate write FAfterCalculate;
property Evaluations: TEvalCollection read FEvalCollection write FEvalCollection;
property Align;
property Color;
property NewPageBefore: Boolean read FnewPageBefore write SetNewPageBefore;
property NewPageAfter: Boolean read FnewPageAfter write SetNewPageAfter;
property OnClick;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnStartDrag;
property TopLeft: TPoint Read GetTopLeft write SetTopLeft;

Methods:

procedure AfterClose(Dataset: TDataset);
procedure SetParent(AParent: TWinControl); override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure CreateParams(var Params: TCreateParams); override;
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
procedure WriteState(Writer: TWriter); override;
function IsRelated(Band: TCWBand): Boolean;
function HasChildBand: Boolean;
function HasParentBand: Boolean;
function Root(Band: TCWBand): TCWBand;
function NewPosRect(MoveBack: Boolean): TRect;
function GroupByChanged(Band: TCWBand): Boolean;
procedure SetPrevValue;
function IsLastBand: Boolean;
procedure Parking(MoveBack: Boolean);
procedure ResetBounds;
procedure UpdateDataset;
destructor Destroy; override;
procedure Prepare;
procedure UnPrepare;
function GetOffsetRect: TRect;
function GetAlignRect(var AFound: Boolean): TRect;
procedure SyncDS;
procedure FreeBookmark;
function BandRect: TRect;
procedure SetValues;
procedure SetControlValues;
destructor Destroy;override;

constructor Create(AOwner: TComponent);override;


constructor Create(AOwner: TComponent);override;


property PosRect: TRect read GetPosRect;

   The "really" Band.BoundsRect.


property NextRect: TRect read GetNextRect;

 


property PrevGroupByFieldValue: String Read FPrevValue;

 


property TopLeft: TPoint read GetTopLeft write SetTopLeft;

 


property BandType: TBandType read FBandType write SetBandType;

   btDefault - visible on each page.

   btDetail - visible if linked Dataset Recordcount > 0.

   btReportHeader - only visible on first page.

   btReportFooter - only visible on last page.

   btGroupHeader - visible if GroupbyExpression has changed - as Header.

   bt GroupFooter - visible if GroupbyExpression has changed - as Footer.


property Dataset: TDataset read FDataset write SetDataset;

  The linked Dataset only used if BandType = btDetail.

 


property Copies : Integer read FCopies write SetCopies default 1;

  Number of detailcopies.


property Columns: Integer read FColumns write SetColumns;

   Number of columns.


property RowSpace: Integer read FRowSpace write SetRowSpace;

  Rowspace between two bands. If rowspace = -1 => rowspace between bands will be defined as the space to the privious band or to the top of the page if previous band is not visible.


property ColumnSpace: Integer read FColumnSpace write SetColumnSpace;

  Columnsspace between two bands.


property ParentBand: TCWBand read FParentBand write SetParentBand;

 If not nil only the band is visible if parentband is visible


property GroupByExpr: string read FGroupByExpr write SetGroupByExpr;

 


property Jump: Boolean read FJump write SetJump;

  if true other bands are jumping around.


property BeforePrint: TCWBandPrintEvent read FBeforePrint write FBeforePrint;

  called before printing - that is the place to change color or another property of the band.


property AfterPrint: TCWBandPrintEvent read FAfterPrint write FAfterPrint;

  Called for each band after printing.


property BeforePaint: TCWBandPaintEvent read FBeforePaint write FBeforePaint;

Called for each band before painting.


property AfterPaint: TCWBandPaintEvent read FAfterPaint write FAfterPaint;

Called for each band after painting.


property BeforeCalculate: TCWBandBeforeCalculateEvent read FBeforeCalculate write FBeforeCalculate;

Called for each band before calculate positions.


property AfterCalculate: TCWBandAfterCalculateEvent read FAfterCalculate write FAfterCalculate;

Called for each band after calculated positions.


property Evaluations: TEvalCollection read FEvalCollection write FEvalCollection;

  It is possible to assign each control calculated values.


property Align;


property Color;


property NewPageBefore: Boolean read FnewPageBefore write SetNewPageBefore;

 If true a new page is showing before painting or printing the band.


property NewPageAfter: Boolean read FnewPageAfter write SetNewPageAfter;

  If true a new page is showing after painting or printing the band.


property OnClick;


property OnDblClick;


property OnDragDrop;


property OnDragOver;


property OnEndDrag;


property OnMouseDown;


property OnMouseMove;


property OnMouseUp;


property OnStartDrag;


property TopLeft: TPoint Read GetTopLeft write SetTopLeft;


procedure AfterClose(Dataset: TDataset);


procedure SetParent(AParent: TWinControl); override;


procedure Notification(AComponent: TComponent; Operation: TOperation); override;


procedure CreateParams(var Params: TCreateParams); override;


procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;


procedure WriteState(Writer: TWriter); override;


function IsRelated(Band: TCWBand): Boolean;


function HasChildBand: Boolean;


function HasParentBand: Boolean;


function Root(Band: TCWBand): TCWBand;


function NewPosRect(MoveBack: Boolean): TRect;


function GroupByChanged(Band: TCWBand): Boolean;


procedure SetPrevValue;


function IsLastBand: Boolean;


procedure Parking(MoveBack: Boolean);


procedure ResetBounds;


procedure UpdateDataset;


destructor Destroy; override;


procedure Prepare;


procedure UnPrepare;


function GetOffsetRect: TRect;


function GetAlignRect(var AFound: Boolean): TRect;


procedure SyncDS;


procedure FreeBookmark;


function BandRect: TRect;


procedure SetValues;


procedure SetControlValues;


destructor Destroy;override;