FastReport KeepHeader / KeepFooter属性被忽略

时间:2016-10-12 06:51:09

标签: delphi vcl fastreport

我有一个(非常)简单的示例报告,目标是将header / masterdata / footer band保持在同一页面上,因此如果它们不适合当前页面,则希望它们移动到新的空页面。根据FR用户手册,我应该将KeepHeader / KeepFooter属性设置为True,没有运气。 有谁能告诉我,我在这里想念什么?

样本报告:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<TfrxReport Version="5.3.17" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="42655,3512323611" ReportOptions.Description.Text="" ReportOptions.LastChange="42655,3605296875" ScriptLanguage="PascalScript" ScriptText.Text="&#13;&#10;begin&#13;&#10;&#13;&#10;end.">
  <TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000"/>
  <TfrxReportPage Name="Page1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
    <TfrxReportTitle Name="ReportTitle1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="430,86642" Left="0" Top="18,89765" Width="718,1107">
      <TfrxMemoView Name="Memo1" Left="7,55906" Top="7,55906" Width="94,48825" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="title"/>
    </TfrxReportTitle>
    <TfrxHeader Name="Header1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="22,67718" Left="0" Top="510,23655" Width="718,1107">
      <TfrxMemoView Name="Memo2" Left="7,55906" Top="0,77953" Width="94,48825" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="header"/>
    </TfrxHeader>
    <TfrxMasterData Name="MasterData1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="22,67718" Left="0" Top="555,59091" Width="718,1107" ColumnWidth="0" ColumnGap="0" KeepFooter="True" KeepHeader="True" RowCount="30">
      <TfrxMemoView Name="Memo4" Left="22,67718" Top="1" Width="400,63018" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="row"/>
    </TfrxMasterData>
    <TfrxFooter Name="Footer1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="22,67718" Left="0" Top="600,94527" Width="718,1107">
      <TfrxMemoView Name="Memo3" Left="7,55906" Top="1,22047" Width="94,48825" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="footer"/>
    </TfrxFooter>
  </TfrxReportPage>
</TfrxReport>

1 个答案:

答案 0 :(得分:1)

我收到了FastReport支持的回复,如果其他人遇到同样的问题就是答案:

  

你好,

     

KeepHeader - 确定乐队(第一张唱片)是否与其标题一起打印   KeepFooter - 确定波段(最后一条记录)是否与其页脚一起打印   此外,仅在ReportTitle乐队打印时启动keepeng不起作用   因此,您应该使用TfrxMasterData和RowCount = 1而不是TfrxReportTitle和TfrxGroupHeader而不是TfrxHeader。

     

样本报告:

<?xml version="1.0" encoding="utf-8"?>
<TfrxReport Version="5.5.8" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="42655,3512323611" ReportOptions.Description.Text="" ReportOptions.LastChange="42655,4867425" ScriptLanguage="PascalScript" ScriptText.Text="&#13;&#10;begin&#13;&#10;&#13;&#10;end.">
  <TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000"/>
  <TfrxReportPage Name="Page1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
    <TfrxMasterData Name="ReportTitle1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="430,86642" Left="0" Top="18,89765" Width="718,1107" ColumnWidth="0" ColumnGap="0" RowCount="1">
      <TfrxMemoView Name="Memo1" Left="7,55906" Top="7,55906" Width="94,48825" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="title"/>
    </TfrxMasterData>
    <TfrxMasterData Name="MasterData1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="22,67718" Left="0" Top="555,59091" Width="718,1107" ColumnWidth="0" ColumnGap="0" RowCount="30">
      <TfrxMemoView Name="Memo4" Left="22,67718" Top="1" Width="400,63018" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="row"/>
    </TfrxMasterData>
    <TfrxFooter Name="Footer1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="22,67718" Left="0" Top="600,94527" Width="718,1107">
      <TfrxMemoView Name="Memo3" Left="7,55906" Top="1,22047" Width="94,48825" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="footer"/>
    </TfrxFooter>
    <TfrxGroupHeader Name="GroupHeader1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="21,91373" Left="0" Top="496" Width="718,1107" Condition="True" KeepTogether="True">
      <TfrxMemoView Name="Memo2" Left="7,55906" Top="3,01608" Width="94,48825" Height="18,89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" ParentFont="False" Text="header"/>
    </TfrxGroupHeader>
  </TfrxReportPage>
</TfrxReport>