📄 10.subreports.fr3
字号:
<?xml version="1.0" encoding="utf-8"?>
<TfrxReport Name="" Version="3.15" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="2047" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" ReportOptions.ConnectionName="FR Demo Base" ReportOptions.CreateDate="37871.9972084722" ReportOptions.Description.Text="This example shows how to create nested reports using subreport component." ReportOptions.LastChange="38526.0313366204" ScriptLanguage="C++Script" ScriptText.Text="Extended TotalSales; void Band4OnBeforePrint(TfrxComponent Sender) { TotalSales = 0; } void Band7OnBeforePrint(TfrxComponent Sender) { TotalSales += <Items."Qty"> * <Items."Price">; } // main() {}" OnStartReport="frxReport1OnStartReport" PropData="08446174617365747301010C2400000020446174615365743D224974656D732220446174615365744E616D653D224974656D732200010C2C00000020446174615365743D22437573746F6D6572732220446174615365744E616D653D22437573746F6D6572732200010C2600000020446174615365743D224F72646572732220446174615365744E616D653D224F7264657273220000095661726961626C657301010C11000000204E616D653D222044617461626173652200010C2C000000204E616D653D2250617468546F4461746162617365222056616C75653D22272E2E5C64656D6F2E6D646227220000055374796C650100">
<TfrxReportPage Name="Page1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="5" RightMargin="5" TopMargin="5" BottomMargin="5" Columns="1" ColumnWidth="210" ColumnPositions.Text="0" PrintOnPreviousPage="True" HGuides.Text="" VGuides.Text="">
<TfrxADOQuery Name="Items" UserName="Items" CloseDataSource="True" FieldAliases.Text="OrderNo=OrderNo ItemNo=ItemNo a.PartNo=Part No Qty=Qty Discount=Discount b.PartNo=b.PartNo VendorNo=VendorNo Description=Description OnHand=OnHand OnOrder=OnOrder Cost=Cost ListPrice=Price" Master="Orders" SQL.Text="select * from items a, parts b where a.partno=b.partno and a.orderno=:orderno order by itemno" PropData="0A506172616D657465727301010C24000000204E616D653D226F726465726E6F222044617461547970653D226674496E7465676572220000"/>
<TfrxADOQuery Name="Customers" UserName="Customers" CloseDataSource="True" FieldAliases.Text="" SQL.Text="select * from customer order by company" PropData="0A506172616D65746572730100"/>
<TfrxADOQuery Name="Orders" UserName="Orders" CloseDataSource="True" FieldAliases.Text="" Master="Customers" SQL.Text="select * from orders where custno = :custno order by saledate" PropData="0A506172616D657465727301010C23000000204E616D653D22637573746E6F222044617461547970653D226674496E7465676572220000"/>
<TfrxPageFooter Name="Band1" Height="22.67718" Left="0" Top="264.5671" Width="755.906">
<TfrxMemoView Name="Memo1" Left="0" Top="0" Width="710.55164" Height="15.11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" Frame.Typ="4" Frame.Width="2" HAlign="haRight" Memo.Text="[Page#]" ParentFont="False"/>
</TfrxPageFooter>
<TfrxReportTitle Name="Band2" Height="26.45671" Left="0" Top="18.89765" Width="755.906">
<TfrxMemoView Name="Memo2" Left="0" Top="0" Width="710.55164" Height="18.89765" Color="8421376" Font.Charset="1" Font.Color="16777215" Font.Height="-16" Font.Name="Arial" Font.Style="1" HAlign="haCenter" Memo.Text="Customers" ParentFont="False" VAlign="vaBottom"/>
</TfrxReportTitle>
<TfrxPageHeader Name="Band3" Height="15.11812" Left="0" Top="68.03154" Width="755.906">
<TfrxMemoView Name="Memo4" Left="0" Top="0" Width="710.55164" Height="15.11812" Color="16777215" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="4" Frame.Width="2" Memo.Text="" ParentFont="False"/>
</TfrxPageHeader>
<TfrxMasterData Name="Band4" Height="60.47248" Left="0" Top="143.62214" Width="755.906" OnBeforePrint="Band4OnBeforePrint" Columns="1" ColumnWidth="200" ColumnGap="20" DataSet="Customers" DataSetName="Customers" RowCount="0">
<TfrxMemoView Name="Memo5" Left="0" Top="0" Width="302.3624" Height="18.89765" Color="8388608" Font.Charset="1" Font.Color="16777215" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="5" Memo.Text="Company" ParentFont="False" VAlign="vaCenter"/>
<TfrxMemoView Name="Memo6" Left="0" Top="18.89765" Width="302.3624" Height="22.67718" Color="8388608" DataField="Company" DataSet="Customers" DataSetName="Customers" Font.Charset="1" Font.Color="16777215" Font.Height="-19" Font.Name="Arial" Font.Style="2" Frame.Typ="1" Memo.Text="[Customers."Company"]" ParentFont="False" VAlign="vaCenter"/>
<TfrxMemoView Name="Memo7" Left="302.3624" Top="0" Width="188.9765" Height="18.89765" Color="8388608" Font.Charset="1" Font.Color="16777215" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="4" Memo.Text="Phone" ParentFont="False" VAlign="vaCenter"/>
<TfrxMemoView Name="Memo8" Left="491.3389" Top="0" Width="219.21274" Height="18.89765" Color="8388608" Font.Charset="1" Font.Color="16777215" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="6" Memo.Text="Fax" ParentFont="False" VAlign="vaCenter"/>
<TfrxMemoView Name="Memo9" Left="302.3624" Top="18.89765" Width="188.9765" Height="22.67718" Color="8388608" DataField="Phone" DataSet="Customers" DataSetName="Customers" Font.Charset="1" Font.Color="16777215" Font.Height="-19" Font.Name="Arial" Font.Style="2" Memo.Text="[Customers."Phone"]" ParentFont="False" VAlign="vaCenter"/>
<TfrxMemoView Name="Memo10" Left="491.3389" Top="18.89765" Width="219.21274" Height="22.67718" Color="8388608" DataField="FAX" DataSet="Customers" DataSetName="Customers" Font.Charset="1" Font.Color="16777215" Font.Height="-19" Font.Name="Arial" Font.Style="2" Frame.Typ="2" Memo.Text="[Customers."FAX"]" ParentFont="False" VAlign="vaCenter"/>
<TfrxSubreport Name="Subreport1" Left="0" Top="41.57483" Width="94.48825" Height="18.89765" Page="Page4"/>
</TfrxMasterData>
</TfrxReportPage>
<TfrxReportPage Name="Page4" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
<TfrxMasterData Name="MasterData1" Height="37.7953" Left="0" Top="18.89765" Width="718.1107" Columns="1" ColumnWidth="200" ColumnGap="20" DataSet="Orders" DataSetName="Orders" RowCount="0">
<TfrxMemoView Name="Memo12" Left="0" Top="0" Width="120.94496" Height="18.89765" Color="12632256" Frame.Typ="1" Memo.Text="Order No [Orders."OrderNo"]"/>
<TfrxMemoView Name="Memo13" Left="120.94496" Top="0" Width="589.60668" Height="18.89765" Color="12632256" Frame.Typ="2" Memo.Text="Date [Orders."SaleDate"]"/>
<TfrxSubreport Name="Subreport2" Left="0" Top="18.89765" Width="94.48825" Height="18.89765" Page="Page2"/>
</TfrxMasterData>
<TfrxFooter Name="Footer1" Height="26.45671" Left="0" Top="79.37013" Width="718.1107">
<TfrxMemoView Name="Memo14" Left="0" Top="0" Width="710.55164" Height="18.89765" Color="12632256" DisplayFormat.FormatStr="%2.2m" DisplayFormat.Kind="fkNumeric" Frame.Typ="11" Memo.Text="Total sales this customer: [TotalSales]"/>
</TfrxFooter>
</TfrxReportPage>
<TfrxReportPage Name="Page2" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
<TfrxHeader Name="Header1" Height="18.89765" Left="0" Top="18.89765" Width="718.1107">
<TfrxMemoView Name="Memo15" Left="0" Top="0" Width="45.35436" Height="18.89765" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="1" Memo.Text="" ParentFont="False"/>
<TfrxMemoView Name="Memo16" Left="45.35436" Top="0" Width="60.47248" Height="15.11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haCenter" Memo.Text="Part" ParentFont="False"/>
<TfrxMemoView Name="Memo17" Left="113.3859" Top="0" Width="230.55133" Height="15.11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haCenter" Memo.Text="Description" ParentFont="False"/>
<TfrxMemoView Name="Memo18" Left="351.49629" Top="0" Width="79.37013" Height="15.11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haCenter" Memo.Text="Price" ParentFont="False"/>
<TfrxMemoView Name="Memo19" Left="438.42548" Top="0" Width="60.47248" Height="15.11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haCenter" Memo.Text="Qty" ParentFont="False"/>
<TfrxMemoView Name="Memo20" Left="506.45702" Top="0" Width="79.37013" Height="15.11812" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haCenter" Memo.Text="Total" ParentFont="False"/>
<TfrxMemoView Name="Memo11" Left="585.82715" Top="0" Width="124.72449" Height="18.89765" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="2" Memo.Text="" ParentFont="False"/>
</TfrxHeader>
<TfrxMasterData Name="MasterData2" Height="15.11812" Left="0" Top="60.47248" Width="718.1107" OnBeforePrint="Band7OnBeforePrint" Columns="1" ColumnWidth="200" ColumnGap="20" DataSet="Items" DataSetName="Items" RowCount="0">
<TfrxMemoView Name="Memo21" Left="0" Top="0" Width="45.35436" Height="15.11812" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="1" Memo.Text="" ParentFont="False"/>
<TfrxMemoView Name="Memo22" Left="45.35436" Top="0" Width="60.47248" Height="15.11812" DataField="Part No" DataSet="Items" DataSetName="Items" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haCenter" Memo.Text="[Items."Part No"]" ParentFont="False"/>
<TfrxMemoView Name="Memo23" Left="113.3859" Top="0" Width="230.55133" Height="15.11812" DataField="Description" DataSet="Items" DataSetName="Items" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" Memo.Text="[Items."Description"]" ParentFont="False"/>
<TfrxMemoView Name="Memo24" Left="351.49629" Top="0" Width="79.37013" Height="15.11812" DataField="Price" DataSet="Items" DataSetName="Items" DisplayFormat.FormatStr="%2.2m" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haRight" Memo.Text="[Items."Price"]" ParentFont="False"/>
<TfrxMemoView Name="Memo25" Left="438.42548" Top="0" Width="60.47248" Height="15.11812" DataField="Qty" DataSet="Items" DataSetName="Items" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haCenter" Memo.Text="[Items."Qty"]" ParentFont="False"/>
<TfrxMemoView Name="Memo26" Left="506.45702" Top="0" Width="79.37013" Height="15.11812" DisplayFormat.FormatStr="%2.2m" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haRight" Memo.Text="[<Items."Qty">*<Items."Price">]" ParentFont="False"/>
<TfrxMemoView Name="Memo29" Left="585.82715" Top="0" Width="124.72449" Height="15.11812" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="2" Memo.Text="" ParentFont="False"/>
</TfrxMasterData>
<TfrxFooter Name="Footer2" Height="22.67718" Left="0" Top="98.26778" Width="718.1107">
<TfrxMemoView Name="Memo27" Left="0" Top="0" Width="45.35436" Height="22.67718" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="1" Memo.Text="" ParentFont="False"/>
<TfrxMemoView Name="Memo28" Left="45.35436" Top="0" Width="544.25232" Height="18.89765" DisplayFormat.FormatStr="%2.2m" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="128" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="4" HAlign="haRight" Memo.Text="Total this order: [Sum(<Items."Qty">*<Items."Price">)]" ParentFont="False"/>
<TfrxMemoView Name="Memo30" Left="589.60668" Top="0" Width="120.94496" Height="22.67718" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="2" Memo.Text="" ParentFont="False"/>
</TfrxFooter>
</TfrxReportPage>
</TfrxReport>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -