FastReport KeepHeader/KeepFooter 属性被忽略

FastReport KeepHeader/KeepFooter properties ignored

我有一个(非常)简单的示例报告,目标是将 header/masterdata/footer 个条带放在同一页面上,所以如果它们不适合当前页面,我希望它们移动到一个新的空页面页。根据 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>

我已经收到 FastReport 支持的回复,以防其他人遇到同样的问题,这里是答案:

Hello,

KeepHeader - Determines if the band (first record) will be printed together with its header KeepFooter - Determines if the band (last record) will be printed together with its footer Also, start keepeng don't works when ReportTitle band printed only So, you should use TfrxMasterData with RowCount = 1 instead of TfrxReportTitle and TfrxGroupHeader instead of TfrxHeader.

sample report:

<?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>