📄 72.fr3
字号:
<?xml version="1.0" encoding="utf-8"?>
<TfrxReport Name="" DotMatrixReport="False" EngineOptions.MaxMemSize="10000000" IniFile="\Software\Fast Reports" OldStyleProgress="True" PreviewOptions.Buttons="2047" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" ReportOptions.Author="gk" ReportOptions.CreateDate="38264,8615800926" ReportOptions.Description.Text="Demonstrates how to print simple year calendar using old-style cross tab and script. Layout is in North American Style." ReportOptions.Name="Calendar2" ReportOptions.LastChange="38266,9688335648" ReportOptions.VersionMajor="1" ReportOptions.VersionMinor="0" ScriptLanguage="PascalScript" ScriptText.Text="var Months: array[1..12] of string; Days: array[1..7] of string; Year, Month, TheMonth: Integer; StartDay, LastDay, colnum: Integer; Day: String; function StartOfMonth(Year, Month: Integer): Integer; begin Result := DayOfWeek(EncodeDate(Year, Month, 1)); end; function mycolor(cn:Integer):Tcolor; begin case cn of 1: result := clsilver; 7..8: result := clsilver; 14..15: result := clsilver; 21..22: result := clsilver; 28..29: result := clsilver; 35..36: result := clsilver; else result := clwhite; end; end; procedure MasterData1OnBeforePrint(Sender: TfrxComponent); begin TheMonth := (<Line> - 1) * 3; end; procedure Header1OnBeforePrint(Sender: TfrxComponent); begin Month := TheMonth + 1; colnum:= 0; end; procedure MasterData4OnBeforePrint(Sender: TfrxComponent); begin inc(colnum); end; procedure Memo3OnBeforePrint(Sender: TfrxComponent); begin if (Colnum < StartDay) or (Colnum - StartDay + 1 > LastDay) then Day := '' else Day := IntToStr(colnum-startday+1); if Day = '' then begin if colnum > 7 then TfrxMemoView(Sender).Frame.Typ := 0 else TfrxMemoView(Sender).Frame.Typ := ftLeft + ftRight + ftTop + ftBottom; TfrxMemoView(Sender).color := clnone; end else begin TfrxMemoView(Sender).Frame.Typ := ftLeft + ftRight + ftTop + ftBottom; TfrxMemoView(Sender).color := mycolor(colnum); end; end; procedure Memo1OnAfterPrint(Sender: TfrxComponent); begin if colnum = 7 then colnum := 0; end; procedure MasterData3OnBeforePrint(Sender: TfrxComponent); begin StartDay := StartOfMonth(Year, Month); LastDay := DaysInMonth(Year, Month); end; procedure Header2OnBeforePrint(Sender: TfrxComponent); begin Month := TheMonth + 2; colnum:= 0; end; procedure MasterData5OnBeforePrint(Sender: TfrxComponent); begin inc(colnum); end; procedure Memo6OnAfterPrint(Sender: TfrxComponent); begin if colnum = 7 then colnum := 0; end; procedure Memo4OnBeforePrint(Sender: TfrxComponent); begin if (Colnum < StartDay) or (Colnum - StartDay + 1 > LastDay) then Day := '' else Day := IntToStr(colnum-startday+1); if Day = '' then begin if colnum > 7 then TfrxMemoView(Sender).Frame.Typ := 0 else TfrxMemoView(Sender).Frame.Typ := ftLeft + ftRight + ftTop + ftBottom; TfrxMemoView(Sender).color := clnone; end else begin TfrxMemoView(Sender).Frame.Typ := ftLeft + ftRight + ftTop + ftBottom; TfrxMemoView(Sender).color := mycolor(colnum); end; end; procedure MasterData2OnBeforePrint(Sender: TfrxComponent); begin StartDay := StartOfMonth(Year, Month); LastDay := DaysInMonth(Year, Month); end; procedure Header3OnBeforePrint(Sender: TfrxComponent); begin Month := TheMonth + 3; colnum:= 0; end; procedure Memo10OnAfterPrint(Sender: TfrxComponent); begin if colnum = 7 then colnum := 0; end; procedure MasterData7OnBeforePrint(Sender: TfrxComponent); begin inc(colnum); end; procedure Memo7OnBeforePrint(Sender: TfrxComponent); begin if (Colnum < StartDay) or (Colnum - StartDay + 1 > LastDay) then Day := '' else Day := IntToStr(colnum-startday+1); if Day = '' then begin if colnum > 7 then TfrxMemoView(Sender).Frame.Typ := 0 else TfrxMemoView(Sender).Frame.Typ := ftLeft + ftRight + ftTop + ftBottom; TfrxMemoView(Sender).color := clnone; end else begin TfrxMemoView(Sender).Frame.Typ := ftLeft + ftRight + ftTop + ftBottom; TfrxMemoView(Sender).color := mycolor(colnum); end; end; procedure MasterData6OnBeforePrint(Sender: TfrxComponent); begin StartDay := StartOfMonth(Year, Month); LastDay := DaysInMonth(Year, Month); end; procedure DialogPage1OnActivate(Sender: TfrxComponent); var i:integer; begin i := 2000; for i:= 2000 to 2050 do begin with combobox1 do items.add(inttostr(i)); end; dialogpage1.caption := 'US Style Calendar'; combobox1.itemindex := 0; end; procedure Button1OnClick(Sender: TfrxComponent); begin Year:= strtoint(ComboBox1.Items[ComboBox1.ItemIndex]); end; begin Months[1] := 'January'; Months[2] := 'February'; Months[3] := 'March'; Months[4] := 'April'; Months[5] := 'May'; Months[6] := 'June'; Months[7] := 'July'; Months[8] := 'August'; Months[9] := 'September'; Months[10] := 'October'; Months[11] := 'November'; Months[12] := 'December'; Days[1] := 'Sun'; Days[2] := 'Mon'; Days[3] := 'Tue'; Days[4] := 'Wed'; Days[5] := 'Thu'; Days[6] := 'Fri'; Days[7] := 'Sat'; end." PropData="044C65667403880003546F7003B0000844617461736574730E00095661726961626C65730E00055374796C650E00">
<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="MasterData1" Height="20,89765" Left="0" Top="109,60637" Width="718,1107" OnBeforePrint="MasterData1OnBeforePrint" Child="Child1" ColumnWidth="0" ColumnGap="0" RowCount="4" Stretched="True">
<TfrxSubreport Name="Subreport1" Left="0" Top="0" Width="94,48825" Height="18,89765" Page="Page2"/>
<TfrxSubreport Name="Subreport2" Left="241,88992" Top="0" Width="94,48825" Height="18,89765" Page="Page3"/>
<TfrxSubreport Name="Subreport3" Left="480,00031" Top="0" Width="94,48825" Height="18,89765" Page="Page4"/>
</TfrxMasterData>
<TfrxChild Name="Child1" Height="7,01577" Left="0" Top="154,96073" Width="718,1107"/>
<TfrxReportTitle Name="ReportTitle1" Height="30,23624" Left="0" Top="18,89765" Width="718,1107">
<TfrxMemoView Name="Memo8" Left="283,46475" Top="0" Width="151,1812" Height="18,89765" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" HAlign="haCenter" Memo.Text="Calendar - [Year]" ParentFont="False"/>
</TfrxReportTitle>
</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="">
<TfrxMasterData Name="MasterData3" Height="18,89765" Left="0" Top="98,26778" Width="718,1107" OnBeforePrint="MasterData3OnBeforePrint" ColumnWidth="0" ColumnGap="0" RowCount="6">
<TfrxMemoView Name="Memo3" Left="249,44898" Top="0" Width="30,23624" Height="18,89765" OnBeforePrint="Memo3OnBeforePrint" Color="65535" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="15" HAlign="haCenter" Memo.Text="[day]" ParentFont="False"/>
</TfrxMasterData>
<TfrxMasterData Name="MasterData4" Height="1046,92981" Left="249,44898" Top="0" Vertical="True" Width="30,23624" OnBeforePrint="MasterData4OnBeforePrint" ColumnWidth="0" ColumnGap="0" RowCount="7"/>
<TfrxHeader Name="Header1" Height="18,89765" Left="0" Top="18,89765" Width="718,1107" OnBeforePrint="Header1OnBeforePrint" Child="Child2">
<TfrxMemoView Name="Memo2" Left="0" Top="0" Width="211,65368" Height="18,89765" Color="-16777201" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" Frame.Typ="15" HAlign="haCenter" Memo.Text="[Months[Month]]" ParentFont="False"/>
</TfrxHeader>
<TfrxChild Name="Child2" Height="15,11812" Left="0" Top="60,47248" Width="718,1107">
<TfrxMemoView Name="Memo1" Left="249,44898" Top="0" Width="30,23624" Height="15,11812" OnAfterPrint="Memo1OnAfterPrint" Color="-16777201" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="15" HAlign="haCenter" Memo.Text="[days[colnum]]" ParentFont="False"/>
</TfrxChild>
</TfrxReportPage>
<TfrxReportPage Name="Page3" PaperWidth="215,9" PaperHeight="279,4" PaperSize="1" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
<TfrxMasterData Name="MasterData2" Height="18,89765" Left="0" Top="98,26778" Width="740,409927" OnBeforePrint="MasterData2OnBeforePrint" ColumnWidth="0" ColumnGap="0" RowCount="6">
<TfrxMemoView Name="Memo4" Left="18,89765" Top="0" Width="30,23624" Height="18,89765" OnBeforePrint="Memo4OnBeforePrint" Color="65535" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="15" HAlign="haCenter" Memo.Text="[day]" ParentFont="False"/>
</TfrxMasterData>
<TfrxMasterData Name="MasterData5" Height="980,410082" Left="18,89765" Top="0" Vertical="True" Width="30,23624" OnBeforePrint="MasterData5OnBeforePrint" ColumnWidth="0" ColumnGap="0" RowCount="7"/>
<TfrxHeader Name="Header2" Height="18,89765" Left="0" Top="18,89765" Width="740,409927" OnBeforePrint="Header2OnBeforePrint" Child="Child3">
<TfrxMemoView Name="Memo5" Left="0" Top="0" Width="211,65368" Height="18,89765" Color="-16777201" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" Frame.Typ="15" HAlign="haCenter" Memo.Text="[Months[Month]]" ParentFont="False"/>
</TfrxHeader>
<TfrxChild Name="Child3" Height="15,11812" Left="0" Top="60,47248" Width="740,409927">
<TfrxMemoView Name="Memo6" Left="18,89765" Top="0" Width="30,23624" Height="15,11812" OnAfterPrint="Memo6OnAfterPrint" Color="-16777201" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="15" HAlign="haCenter" Memo.Text="[days[colnum]]" ParentFont="False"/>
</TfrxChild>
</TfrxReportPage>
<TfrxReportPage Name="Page4" PaperWidth="215,9" PaperHeight="279,4" PaperSize="1" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
<TfrxMasterData Name="MasterData6" Height="18,89765" Left="0" Top="98,26778" Width="740,409927" OnBeforePrint="MasterData6OnBeforePrint" ColumnWidth="0" ColumnGap="0" RowCount="6">
<TfrxMemoView Name="Memo7" Left="238,11039" Top="0" Width="30,23624" Height="18,89765" OnBeforePrint="Memo7OnBeforePrint" Color="65535" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="1" Frame.Typ="15" HAlign="haCenter" Memo.Text="[day]" ParentFont="False"/>
</TfrxMasterData>
<TfrxMasterData Name="MasterData7" Height="980,410082" Left="238,11039" Top="0" Vertical="True" Width="30,23624" OnBeforePrint="MasterData7OnBeforePrint" ColumnWidth="0" ColumnGap="0" RowCount="7"/>
<TfrxHeader Name="Header3" Height="18,89765" Left="0" Top="18,89765" Width="740,409927" OnBeforePrint="Header3OnBeforePrint" Child="Child3">
<TfrxMemoView Name="Memo9" Left="0" Top="0" Width="211,65368" Height="18,89765" Color="-16777201" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="Arial" Font.Style="1" Frame.Typ="15" HAlign="haCenter" Memo.Text="[Months[Month]]" ParentFont="False"/>
</TfrxHeader>
<TfrxChild Name="Child4" Height="15,11812" Left="0" Top="60,47248" Width="740,409927">
<TfrxMemoView Name="Memo10" Left="238,11039" Top="0" Width="30,23624" Height="15,11812" OnAfterPrint="Memo10OnAfterPrint" Color="-16777201" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="15" HAlign="haCenter" Memo.Text="[days[colnum]]" ParentFont="False"/>
</TfrxChild>
</TfrxReportPage>
<TfrxDialogPage Name="DialogPage1" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Tahoma" Font.Style="0" Caption="Show" Height="200" Left="264" Top="236" Width="300" OnActivate="DialogPage1OnActivate">
<TfrxComboBoxControl Name="ComboBox1" Left="114" Top="27" Width="76" Height="21" Color="-16777211" Items.Text=""/>
<TfrxButtonControl Name="Button1" Left="53" Top="99" Width="75" Height="25" Caption="Show" ModalResult="1" OnClick="Button1OnClick"/>
<TfrxLabelControl Name="Label1" Left="110" Top="3" Width="73" Height="13" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Tahoma" Font.Style="1" ParentFont="False" Caption="select a year"/>
<TfrxButtonControl Name="Button2" Left="184" Top="102" Width="75" Height="25" Cancel="True" Caption="Cancel" Default="True" ModalResult="2"/>
</TfrxDialogPage>
</TfrxReport>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -