1
votes

I have a (very) simple sample report, the goal is to keep header/masterdata/footer bands together on the same page, so if they wont fit on the current page want them to move to a new, empty page. According to the FR user manual I supposed to set the KeepHeader/KeepFooter properties to True, no luck. Could anyone tell me please what do I miss here?

sample report:

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

1 Answers

1
votes

I have received reply from FastReport support, in case if anyone else facing the same problem here is the answer:

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>