<?xml version="1.0" encoding="utf-8"?>
<TfrxReport Version="6.1.4" DotMatrixReport="0" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="167935" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="43279.6216718519" ReportOptions.Description.Text="Demonstrates how to use Table object from code." ReportOptions.LastChange="43279.6424912153" ScriptLanguage="PascalScript" ScriptText.Text="procedure ReportTitle1OnBeforePrint(Sender: TfrxComponent);&#13;&#10;var&#13;&#10;  DS: TfrxDataSet;&#13;&#10;  row: TfrxTableRow;&#13;&#10;  FirstCell, LastCell : Integer;&#13;&#10;begin&#13;&#10;  ds := Report.GetDataset('Customers');&#13;&#10;  if ds = nil then Exit;&#13;&#10;  ds.First;&#13;&#10;  FirstCell := -1;&#13;&#10;  LastCell := 2;&#13;&#10;  while not ds.Eof do&#13;&#10;  begin&#13;&#10;    if (LastCell = 3) then&#13;&#10;      FirstCell := 2;&#13;&#10;    if (TableObject1.Cells(0, TableObject1.RowCount - 1).Lines[0] &#60;&#62; Copy(&#60;Customers.&#34;Company&#34;&#62;, 1, 1)) and (FirstCell &#60;&#62; -1) then&#13;&#10;    begin&#13;&#10;      TableObject1.JoinSelection(0, FirstCell, 0, LastCell);&#13;&#10;      FirstCell := LastCell;&#13;&#10;    end;&#13;&#10;    Inc(LastCell);&#13;&#10;    row := TableObject1.CreateNewRow(TableObject1.RowCount);&#13;&#10;    row.AutoSize := True;&#13;&#10;    row.Cells[0].Text := Copy(&#60;Customers.&#34;Company&#34;&#62;, 1, 1);&#13;&#10;    row.Cells[0].HAlign := haCenter;&#13;&#10;    row.Cells[0].VAlign := vaCenter;&#13;&#10;    row.Cells[1].Text := &#60;Customers.&#34;Company&#34;&#62;;&#13;&#10;    row.Cells[2].Text := &#60;Customers.&#34;Contact&#34;&#62;;&#13;&#10;    row.Cells[3].Text := &#60;Customers.&#34;Addr1&#34;&#62;;&#13;&#10;    row.Cells[4].Text := &#60;Customers.&#34;Phone&#34;&#62;;&#13;&#10;    ds.Next;&#13;&#10;  end;&#13;&#10;end;&#13;&#10;&#13;&#10;begin&#13;&#10;&#13;&#10;end.">
  <Datasets>
    <item DataSet="ReportData.CustomersDS" DataSetName="Customers"/>
  </Datasets>
  <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="" Frame.Typ="0" HGuides.Text="" VGuides.Text="">
    <TfrxReportTitle Name="ReportTitle1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="45.35436" Left="0" Top="18.89765" Width="718.1107" OnBeforePrint="ReportTitle1OnBeforePrint" AllowSplit="1" Stretched="1">
      <TfrxTableObject Name="TableObject1" AllowVectorExport="1" Left="11.33859" Top="7.55906" StretchMode="smMaxHeight">
        <TfrxTableColumn Name="TableColumn1" Width="57.103937007874" MinWidth="0" MaxWidth="75.5906"/>
        <TfrxTableColumn Name="TableColumn2" Width="181.103937007874" MinWidth="0" MaxWidth="75.5906"/>
        <TfrxTableColumn Name="TableColumn3" Width="176.103937007874" MinWidth="0" MaxWidth="75.5906"/>
        <TfrxTableColumn Name="TableColumn4" Width="173.103937007874" MinWidth="0" MaxWidth="75.5906"/>
        <TfrxTableColumn Name="TableColumn5" Width="101.103937007874" MinWidth="0" MaxWidth="75.5906"/>
        <TfrxTableRow Name="TableRow1" MinHeight="0" MaxHeight="0" Height="18.89765">
          <TfrxTableCell Name="TableCell1" AllowVectorExport="1" Restrictions="8" Font.Color="16777215" Font.Height="-19" Font.Name="Arial" Font.Style="1" Frame.Typ="15" Fill.BackColor="8421504" HAlign="haCenter" Memo.Text="Customers" ParentFont="0" VAlign="vaCenter" ColSpan="5" Text="Customers"/>
          <TfrxTableCell Name="TableCell2" AllowVectorExport="1" Restrictions="8" Visible="0" Frame.Typ="15" Memo.Text="" Text=""/>
          <TfrxTableCell Name="TableCell3" AllowVectorExport="1" Restrictions="8" Visible="0" Frame.Typ="15" Memo.Text="" Text=""/>
          <TfrxTableCell Name="TableCell4" AllowVectorExport="1" Restrictions="8" Visible="0" Frame.Typ="15" Memo.Text="" Text=""/>
          <TfrxTableCell Name="TableCell5" AllowVectorExport="1" Restrictions="8" Visible="0" Frame.Typ="15" Memo.Text="" Text=""/>
        </TfrxTableRow>
        <TfrxTableRow Name="TableRow2" MinHeight="0" MaxHeight="0" Height="18.89765">
          <TfrxTableCell Name="TableCell6" AllowVectorExport="1" Restrictions="8" Font.Color="8421504" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="15" HAlign="haCenter" Memo.Text="Group" ParentFont="0" Text="Group"/>
          <TfrxTableCell Name="TableCell7" AllowVectorExport="1" Restrictions="8" Font.Color="8421504" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="15" Memo.Text="Company" ParentFont="0" Text="Company"/>
          <TfrxTableCell Name="TableCell8" AllowVectorExport="1" Restrictions="8" Font.Color="8421504" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="15" Memo.Text="Contact" ParentFont="0" Text="Contact"/>
          <TfrxTableCell Name="TableCell9" AllowVectorExport="1" Restrictions="8" Font.Color="8421504" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="15" Memo.Text="Addr1" ParentFont="0" Text="Addr1"/>
          <TfrxTableCell Name="TableCell10" AllowVectorExport="1" Restrictions="8" Font.Color="8421504" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="15" Memo.Text="Phone" ParentFont="0" Text="Phone"/>
        </TfrxTableRow>
      </TfrxTableObject>
    </TfrxReportTitle>
  </TfrxReportPage>
</TfrxReport>
