瀏覽代碼

* Patch from Pascal Riekenberg to fix multi-column layout

git-svn-id: trunk@37363 -
michael 8 年之前
父節點
當前提交
76a6c67022
共有 2 個文件被更改,包括 262 次插入348 次删除
  1. 20 17
      packages/fcl-report/demos/rptcolumns.pp
  2. 242 331
      packages/fcl-report/src/fpreport.pp

+ 20 - 17
packages/fcl-report/demos/rptcolumns.pp

@@ -263,13 +263,33 @@ begin
   Memo.TextAlignment.Horizontal := taLeftJustified;
   Memo.TextAlignment.Vertical := tlCenter;
 
+  DataFooter := TFPReportDataFooterBand.Create(p);
+  DataFooter.Layout.Height := 10;
+  DataFooter.Frame.Shape := fsRectangle;
+  DataFooter.Frame.BackgroundColor := TFPReportColor($ffa500);
+  DataFooter.UseParentFont := False;
+  DataFooter.Font.Name := 'LiberationSans-Bold';
+  DataFooter.Font.Color := clWhite;
+
+  Memo := TFPReportMemo.Create(DataFooter);
+  Memo.Layout.Left := 5;
+  Memo.Layout.Top := 1.5;
+  Memo.Layout.Width := 50;
+  Memo.Layout.Height := 8;
+  Memo.Text := 'DataFooter Band';
+  Memo.TextAlignment.Horizontal := taLeftJustified;
+  Memo.TextAlignment.Vertical := tlCenter;
+
   DataBand := TFPReportDataBand.Create(p);
   DataBand.Layout.Height := 10;
   DataBand.Data := FDataPage2;
+  DataBand.KeepTogetherWithChildren := False;
   DataBand.Frame.Shape := fsRectangle;
   DataBand.Frame.BackgroundColor := clDataBand;
   { associated DataHeader band }
   DataBand.HeaderBand := DataHeader;
+  { associated DataFooter band }
+  DataBand.FooterBand := DataFooter;
 
   Memo := TFPReportMemo.Create(DataBand);
   Memo.Layout.Left := 5;
@@ -292,23 +312,6 @@ begin
 
   DataBand.ChildBand := ChildBand;
 
-  DataFooter := TFPReportDataFooterBand.Create(p);
-  DataFooter.Layout.Height := 10;
-  DataFooter.Frame.Shape := fsRectangle;
-  DataFooter.Frame.BackgroundColor := TFPReportColor($ffa500);
-  DataFooter.UseParentFont := False;
-  DataFooter.Font.Name := 'LiberationSans-Bold';
-  DataFooter.Font.Color := clWhite;
-
-  Memo := TFPReportMemo.Create(DataFooter);
-  Memo.Layout.Left := 5;
-  Memo.Layout.Top := 1.5;
-  Memo.Layout.Width := 50;
-  Memo.Layout.Height := 8;
-  Memo.Text := 'DataFooter Band';
-  Memo.TextAlignment.Horizontal := taLeftJustified;
-  Memo.TextAlignment.Vertical := tlCenter;
-
   ColumnFooter := TFPReportColumnFooterBand.Create(p);
   ColumnFooter.Layout.Height := 15;
   ColumnFooter.Frame.Shape := fsRectangle;

文件差異過大導致無法顯示
+ 242 - 331
packages/fcl-report/src/fpreport.pp


部分文件因文件數量過多而無法顯示