FastReport_FMX_2.8.12/Demos/Main/102.fr3

14 lines
12 KiB
Plaintext
Raw Permalink Normal View History

2024-01-10 21:50:38 +01:00
<?xml version="1.0" encoding="utf-8"?>
<TfrxReport Version="4.0a" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.DoubleBuffered="False" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="37907,6514537153" ReportOptions.Description.Text="Demonstrates how to print an object inside the cross table. To do this:&#13;&#10;&#13;&#10;- increase the width of the cross cell by TfrxCrossView.AddWidth property (set to 0,5 cm)&#13;&#10;&#13;&#10;- create OnBeforePrint event handler for cross cell&#13;&#10;&#13;&#10;- in the handler, create an object that you want to display in the cross-tab. Note: object should have the same parent as the Sender parameter." ReportOptions.LastChange="39010,0359961458" ScriptLanguage="PascalScript" ScriptText.Text="procedure CellMemo0OnBeforePrint(Sender: TfrxComponent);&#13;&#10;var&#13;&#10; sh: TfrxShapeView;&#13;&#10; Memo: TfrxMemoView;&#13;&#10;begin&#13;&#10; { cast to TfrxMemoView for more comfort }&#13;&#10; Memo := TfrxMemoView(Sender);&#13;&#10;&#13;&#10; { create the shape object that will indicate the cell rating }&#13;&#10; { note - you should use Sender.Parent as a parent for new object! }&#13;&#10; sh := TfrxShapeView.Create(Memo.Parent);&#13;&#10; sh.SetBounds(Memo.Left + 8, Memo.Top + 8, 8, 8);&#13;&#10; sh.Frame.Width := 2;&#13;&#10;&#13;&#10; { choose shape color depending on cell value }&#13;&#10; if Memo.Value &#60; 100 then&#13;&#10; sh.Frame.Color := clBlack&#13;&#10; else if Memo.Value &#60; 3000 then&#13;&#10; sh.Frame.Color := clRed&#13;&#10; else&#13;&#10; sh.Frame.Color := clGreen;&#13;&#10;&#13;&#10;end;&#13;&#10;&#13;&#10;begin&#13;&#10;&#13;&#10;end." PropData="044C656674026003546F7003700108446174617365747301010C3100000020446174615365743D225265706F7274446174612E43726F737344532220446174615365744E616D653D2243726F7373220000095661726961626C65730100055374796C650100">
<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" Height="52,91342" Left="0" Top="18,89765" Width="718,1107">
<TfrxMemoView Name="Memo1" Left="0" Top="0" Width="309,92146" Height="34,01577" DisplayFormat.DecimalSeparator="," Text="Employee's salary per month&#13;&#10; &#60; 100 &#60; 3000 &#62;= 3000"/>
<TfrxShapeView Name="Shape1" Left="3,77953" Top="20,7874015748031" Width="7,55906" Height="7,55906" Frame.Width="2"/>
<TfrxShapeView Name="Shape2" Left="68,03154" Top="20,78740157" Width="7,55906" Height="7,55906" Frame.Color="255" Frame.Width="2"/>
<TfrxShapeView Name="Shape3" Left="143,62214" Top="20,78740157" Width="7,55906" Height="7,55906" Frame.Color="32768" Frame.Width="2"/>
</TfrxReportTitle>
<TfrxDBCrossView Name="Cross1" Left="0" Top="75,5906" Width="263,897637795276" Height="128" AddHeight="0" AddWidth="18,8976377952756" DownThenAcross="False" NextCrossGap="0" CellFields.Text="Salary" ColumnFields.Text="Year" DataSet="ReportData.CrossDS" DataSetName="Cross" RowFields.Text="Name" PropData="054D656D6F730A381200003C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D227574662D38223F3E3C63726F73733E3C63656C6C6D656D6F733E3C546672784D656D6F56696577204C6566743D223130312220546F703D223133392C35393036222057696474683D2236312C3839373633373739353237353622204865696768743D22323222205265737472696374696F6E733D22333022204F6E4265666F72655072696E743D2243656C6C4D656D6F304F6E4265666F72655072696E742220416C6C6F7745787072657373696F6E733D2246616C73652220446973706C6179466F726D61742E446563696D616C536570617261746F723D222C2220446973706C6179466F726D61742E466F726D61745374723D2225322E326D2220446973706C6179466F726D61742E4B696E643D22666B4E756D657269632220466F6E742E436861727365743D22312220466F6E742E436F6C6F723D222D323134373438333634302220466F6E742E4865696768743D222D31332220466F6E742E4E616D653D22417269616C2220466F6E742E5374796C653D223022204672616D652E436F6C6F723D223834323135303422204672616D652E5479703D2231352220476170583D22332220476170593D2233222048416C69676E3D22686152696768742220506172656E74466F6E743D2246616C736522205374796C653D2263656C6C222056416C69676E3D22766143656E7465722220546578743D22302C3030D1802E222F3E3C546672784D656D6F56696577205461673D223122204C6566743D223130312220546F703D223136312C35393036222057696474683D2236312C3839373633373739353237353622204865696768743D22323222205265737472696374696F6E733D2233302220416C6C6F7745787072657373696F6E733D2246616C73652220446973706C6179466F726D61742E446563696D616C536570617261746F723D222C2220446973706C6179466F726D61742E466F726D61745374723D2225322E326D2220446973706C6179466F726D61742E4B696E643D22666B4E756D6572696322204672616D652E436F6C6F723D223834323135303422204672616D652E5479703D2231352220476170583D22332220476170593D2233222048416C69676E3D226861526967687422205374796C653D2263656C6C222056416C69676E3D22766143656E7465722220546578743D22302C3030D1802E222F3E3C546672784D656D6F56696577205461673D223222204C6566743D223136322C3839373633373739353237362220546F703D223133392C35393036222057696474683D22383122204865696768743D22323222205265737472696374696F6E733D2233302220416C6C6F7745787072657373696F6E733D2246616C73652220446973706C6179466F726D61742E446563696D616C536570617261746F723D222C2220446973706C6179466F726D61742E466F726D61745374723D2225322E326D2220446973706C6179466F726D61742E4B696E643D22666B4E756D6572696322204672616D652E436F6C6F723D223834323135303422204672616D652E5479703D2231352220476170583D22332220476170593D2233222048416C69676E3D226861526967687422205374796C653D2263656C6C222056416C69676E3D22766143656E7465722220546578743D22302C3030D1802E222F3E3C546672784D656D6F56696577205461673D223322204C6566743D223136322C3839373633373739353237362220546F703D223136312C35393036222057696474683D22383122204865696768743D22323222205265737472696374696F6E733D2233302220416C6C6F7745787072657373696F6E733D2246616C73652220446973706C6179466F726D61742E446563696D616C536570617261746F723D222C2220446973706C6179466F726D61742E466F726D61745374723D2225322E326D2220446973706C6179466F726D61742E4B696E643D22666B4E756D6572696322204672616D652E436F6C6F723D223834323135303422204672616D652E5479703D2231352220476170583D22332220476170593D2233222048416C69676E3D226861526967687422205374796C653D2263656C6C222056416C69676E3D22766143656E7465722220546578743D22302C3030D1802E222F3E3C2F63656C6C6D656D6F733E3C63656C6C6865616465726D656D6F733E3C546672784D656D6F56696577205461673D2236303022204C6566743D22302220546F703D2230222057696474683D223022204865696768743D22302220416C6C6F7745787072657373696F6E733D2246616C736522204672616D652E5479703D2231352220476170583D22332220476170593D223322205374796C653D2263656C6C686561646572222056416C69676E3D22766143656E7465722220546578743D22222F3E3C546672784D656D6F56696577205461673D2236303122204C6566743D22302220546F703D2230222057696474683D223022204865696768743D22302220416C6C6F7745787072657373696F6E733D2246616C736522204672616D652E5479703D2231352220476170583D223322
</TfrxReportPage>
</TfrxReport>