|
@@ -907,6 +907,7 @@ type
|
|
procedure SetDataFromName(AName : String); virtual;
|
|
procedure SetDataFromName(AName : String); virtual;
|
|
procedure SetParent(const AValue: TFPReportElement); override;
|
|
procedure SetParent(const AValue: TFPReportElement); override;
|
|
procedure CreateRTLayout; override;
|
|
procedure CreateRTLayout; override;
|
|
|
|
+ Procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
|
function PrepareObject(aRTParent: TFPReportElement): TFPReportElement; override;
|
|
function PrepareObject(aRTParent: TFPReportElement): TFPReportElement; override;
|
|
{ this is normally run against the runtime version of the Band instance. }
|
|
{ this is normally run against the runtime version of the Band instance. }
|
|
procedure RecalcLayout; override;
|
|
procedure RecalcLayout; override;
|
|
@@ -978,12 +979,16 @@ type
|
|
FFooterBand: TFPReportCustomDataFooterBand;
|
|
FFooterBand: TFPReportCustomDataFooterBand;
|
|
FMasterBand: TFPReportCustomDataBand;
|
|
FMasterBand: TFPReportCustomDataBand;
|
|
FDisplayPosition: Integer;
|
|
FDisplayPosition: Integer;
|
|
|
|
+ procedure SetFooterBand(AValue: TFPReportCustomDataFooterBand);
|
|
|
|
+ procedure SetHeaderBand(AValue: TFPReportCustomDataHeaderBand);
|
|
|
|
+ procedure SetMasterBand(AValue: TFPReportCustomDataBand);
|
|
protected
|
|
protected
|
|
Procedure FixupReference(PN,PV : String; C : TFPReportElement); override;
|
|
Procedure FixupReference(PN,PV : String; C : TFPReportElement); override;
|
|
|
|
+ Procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
|
property DisplayPosition: Integer read FDisplayPosition write FDisplayPosition default 0;
|
|
property DisplayPosition: Integer read FDisplayPosition write FDisplayPosition default 0;
|
|
- property FooterBand: TFPReportCustomDataFooterBand read FFooterBand write FFooterBand;
|
|
|
|
- property HeaderBand: TFPReportCustomDataHeaderBand read FHeaderBand write FHeaderBand;
|
|
|
|
- property MasterBand: TFPReportCustomDataBand read FMasterBand write FMasterBand;
|
|
|
|
|
|
+ property FooterBand: TFPReportCustomDataFooterBand read FFooterBand write SetFooterBand;
|
|
|
|
+ property HeaderBand: TFPReportCustomDataHeaderBand read FHeaderBand write SetHeaderBand;
|
|
|
|
+ property MasterBand: TFPReportCustomDataBand read FMasterBand write SetMasterBand;
|
|
public
|
|
public
|
|
procedure DoWriteLocalProperties(AWriter: TFPReportStreamer; AOriginal: TFPReportElement = nil); override;
|
|
procedure DoWriteLocalProperties(AWriter: TFPReportStreamer; AOriginal: TFPReportElement = nil); override;
|
|
procedure ReadElement(AReader: TFPReportStreamer); override;
|
|
procedure ReadElement(AReader: TFPReportStreamer); override;
|
|
@@ -5137,6 +5142,36 @@ end;
|
|
|
|
|
|
{ TFPReportCustomDataBand }
|
|
{ TFPReportCustomDataBand }
|
|
|
|
|
|
|
|
+procedure TFPReportCustomDataBand.SetFooterBand(AValue: TFPReportCustomDataFooterBand);
|
|
|
|
+begin
|
|
|
|
+ if FFooterBand=AValue then Exit;
|
|
|
|
+ if Assigned(FFooterBand) then
|
|
|
|
+ FFooterBand.RemoveFreeNotification(Self);
|
|
|
|
+ FFooterBand:=AValue;
|
|
|
|
+ if Assigned(FFooterBand) then
|
|
|
|
+ FFooterBand.FreeNotification(Self);
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TFPReportCustomDataBand.SetHeaderBand(AValue: TFPReportCustomDataHeaderBand);
|
|
|
|
+begin
|
|
|
|
+ if FHeaderBand=AValue then Exit;
|
|
|
|
+ if Assigned(FHeaderBand) then
|
|
|
|
+ FHeaderBand.RemoveFreeNotification(Self);
|
|
|
|
+ FHeaderBand:=AValue;
|
|
|
|
+ if Assigned(FHeaderBand) then
|
|
|
|
+ FHeaderBand.FreeNotification(Self);
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+procedure TFPReportCustomDataBand.SetMasterBand(AValue: TFPReportCustomDataBand);
|
|
|
|
+begin
|
|
|
|
+ if FMasterBand=AValue then Exit;
|
|
|
|
+ if Assigned(FMasterBand) then
|
|
|
|
+ FMasterBand.RemoveFreeNotification(Self);
|
|
|
|
+ FMasterBand:=AValue;
|
|
|
|
+ if Assigned(FMasterBand) then
|
|
|
|
+ FMasterBand.FreeNotification(Self);
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TFPReportCustomDataBand.FixupReference(PN, PV: String; C: TFPReportElement);
|
|
procedure TFPReportCustomDataBand.FixupReference(PN, PV: String; C: TFPReportElement);
|
|
begin
|
|
begin
|
|
If SameText('FooterBand',PN) and (C is TFPReportCustomDataFooterBand) then
|
|
If SameText('FooterBand',PN) and (C is TFPReportCustomDataFooterBand) then
|
|
@@ -5149,6 +5184,20 @@ begin
|
|
Inherited;
|
|
Inherited;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TFPReportCustomDataBand.Notification(AComponent: TComponent; Operation: TOperation);
|
|
|
|
+begin
|
|
|
|
+ inherited Notification(AComponent, Operation);
|
|
|
|
+ if Operation=opRemove then
|
|
|
|
+ begin
|
|
|
|
+ if AComponent = FHeaderBand then
|
|
|
|
+ FheaderBand:=Nil
|
|
|
|
+ else if AComponent = FFooterBand then
|
|
|
|
+ FFooterBand:=Nil
|
|
|
|
+ else if AComponent = FMasterBand then
|
|
|
|
+ FMasterBand:=Nil;
|
|
|
|
+ end;
|
|
|
|
+end;
|
|
|
|
+
|
|
procedure TFPReportCustomDataBand.DoWriteLocalProperties(AWriter: TFPReportStreamer; AOriginal: TFPReportElement = nil);
|
|
procedure TFPReportCustomDataBand.DoWriteLocalProperties(AWriter: TFPReportStreamer; AOriginal: TFPReportElement = nil);
|
|
|
|
|
|
Procedure WBand(B : TFPReportCustomBand; Prefix : String);
|
|
Procedure WBand(B : TFPReportCustomBand; Prefix : String);
|
|
@@ -8077,20 +8126,23 @@ var
|
|
begin
|
|
begin
|
|
if FChildBand = AValue then
|
|
if FChildBand = AValue then
|
|
Exit;
|
|
Exit;
|
|
- FChildBand := AValue;
|
|
|
|
- b := FChildBand;
|
|
|
|
|
|
+ if Assigned(FChildBand) then
|
|
|
|
+ FChildBand.RemoveFreeNotification(Self);
|
|
|
|
+ b := aValue;
|
|
while b <> nil do
|
|
while b <> nil do
|
|
- begin
|
|
|
|
- b := b.ChildBand;
|
|
|
|
- if b = self then
|
|
|
|
|
|
+ begin
|
|
|
|
+ b:=b.ChildBand;
|
|
|
|
+ if b=self then
|
|
raise EReportError.Create(SErrChildBandCircularReference);
|
|
raise EReportError.Create(SErrChildBandCircularReference);
|
|
- end;
|
|
|
|
|
|
+ end;
|
|
|
|
+ FChildBand := AValue;
|
|
if Assigned(FChildBand) then
|
|
if Assigned(FChildBand) then
|
|
- begin
|
|
|
|
|
|
+ begin
|
|
|
|
+ FChildBand.RemoveFreeNotification(Self);
|
|
FChildBand.FParentBand := Self;
|
|
FChildBand.FParentBand := Self;
|
|
FChildBand.FMainBand := FMainBand;
|
|
FChildBand.FMainBand := FMainBand;
|
|
Page.ApplyBandWidth(FChildBand);
|
|
Page.ApplyBandWidth(FChildBand);
|
|
- end;
|
|
|
|
|
|
+ end;
|
|
end;
|
|
end;
|
|
|
|
|
|
procedure TFPReportCustomBand.ApplyStretchMode;
|
|
procedure TFPReportCustomBand.ApplyStretchMode;
|
|
@@ -8176,6 +8228,16 @@ begin
|
|
FRTLayout.Left := Page.Layout.Left;
|
|
FRTLayout.Left := Page.Layout.Left;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TFPReportCustomBand.Notification(AComponent: TComponent; Operation: TOperation);
|
|
|
|
+begin
|
|
|
|
+ inherited Notification(AComponent, Operation);
|
|
|
|
+ if Operation=opRemove then
|
|
|
|
+ begin
|
|
|
|
+ if AComponent=FChildBand then
|
|
|
|
+ FChildBand:=Nil;
|
|
|
|
+ end;
|
|
|
|
+end;
|
|
|
|
+
|
|
function TFPReportCustomBand.PrepareObject(aRTParent: TFPReportElement): TFPReportElement;
|
|
function TFPReportCustomBand.PrepareObject(aRTParent: TFPReportElement): TFPReportElement;
|
|
|
|
|
|
var
|
|
var
|