home *** CD-ROM | disk | FTP | other *** search
/ Freelog 100 / FreelogNo100-NovembreDecembre2010.iso / ViePratique / essentialpim / essentialpim3.exe / Reports / MonthClassic.fr3 < prev    next >
Extensible Markup Language  |  2009-04-03  |  13KB  |  40 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <TfrxReport Version="4.7.79" DotMatrixReport="False" IniFile="\Software\Fast Reports" OldStyleProgress="True" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="39885,6569446181" ReportOptions.Description.Text="" ReportOptions.LastChange="39900,4057095255" ScriptLanguage="PascalScript" ScriptText.Text="var   CalendarStartDate: TDateTime;   DayLeft,DayTop,DayWidth,DayHeight,DayTaskCount: Extended; function StartOfTheMonth(const AValue: TDateTime): TDateTime; var   LYear, LMonth, LDay: Word; begin   DecodeDate(AValue, LYear, LMonth, LDay);   Result := EncodeDate(LYear, LMonth, 1); end; procedure CalendarOnBeforePrint(Sender: TfrxComponent); var   Row: Integer; begin   CalendarStartDate := 0;   DayWidth := Engine.PageWidth / 7;   if MonthOf(<Months."FirstDay"> + 35) <> MonthOf(<Months."FirstDay"> + 7) then    Row := 5   else    Row := 6;   DayHeight := (Engine.PageHeight - 140) / Row;   DayTaskCount := (DayHeight - 17) div 12; end; procedure CalHeaderOnBeforePrint(Sender: TfrxComponent); begin   if CalendarStartDate = 0 then    CalendarStartDate := <Months."FirstDay">   else   begin                  CalendarStartDate := StartOfTheMonth(CalendarStartDate + 42);    CalendarStartDate := CalendarStartDate - DayOfWeek(CalendarStartDate - <FirstDayOfWeek> + 5) mod 7;   end;              end; procedure CalDayOnAfterData(Sender: TfrxComponent); var   D: TDateTime; begin   D := CalendarStartDate + <Line> - 1;   with TfrxMemoView(Sender) do   begin    if MonthOf(D) <> MonthOf(CalendarStartDate + 7) then     Text := ''    else    begin     Text := IntToStr(DayOf(D));     if 1 shl ((DayOfWeek(D) + 5) mod 7) and <WorkDays> = 0 then      Font.Color := clRed     else      Font.Color := clWindowText;    end;    if (Text <> '') and (TaskCount(D) > 0) then     Color := $D0D0D0    else     Color := clNone;   end; end; procedure WeekDayOnBeforePrint(Sender: TfrxComponent); begin   if <Line> = 1 then    DayTop := Engine.CurY + 20   else    Engine.CurY := DayTop - 20;   TfrxMemoView(Sender).Left := (<Line> - 1) mod 7 * DayWidth;   TfrxMemoView(Sender).Width := DayWidth; end; procedure DateOnBeforePrint(Sender: TfrxComponent); begin   if (<Line> mod 7 = 1) and (<Line> <> 1) then    DayTop := DayTop + DayHeight;   Engine.CurY := DayTop;   DayLeft := (<Line> - 1) mod 7 * DayWidth;   with TfrxMemoView(Sender) do   begin    Left := DayLeft;    Width := DayWidth;    if (<Line> = 1) or (StartOfTheMonth(<Days."Day">) = <Days."Day">) then     DisplayFormat.FormatStr := 'd mmmm'    else     DisplayFormat.FormatStr := 'd';    if 1 shl ((DayOfWeek(<Days."Day">) + 5) mod 7) and <WorkDays> = 0 then     Font.Color := clRed    else     Font.Color := clWindowText;   end; end; procedure DayOnBeforePrint(Sender: TfrxComponent); begin   with TfrxMemoView(Sender) do   begin    Left := DayLeft;    Width := DayWidth;    Height := DayHeight - 17;    if MonthOf(<Days."Day">) <> MonthOf(<Months."FirstDay"> + 7) then     Color := $EEEEEE    else     Color := clNone;   end; end; procedure TaskOnBeforePrint(Sender: TfrxComponent); var   X: Integer; begin   if <Line> = 1 then    Engine.CurY := DayTop + 17;   with TfrxMemoView(Sender) do   begin    Visible := <Line> <= DayTaskCount;    if <Line> > DayTaskCount then     Engine.CurY := DayTop;    Left := DayLeft + 2;    Width := DayWidth - 4;    Color := <DayTasks."BackgroundColor">;    X := 1;    if <DayTasks."Priority.Img"> <> '' then     X := X + 12;    if <DayTasks."Completion.Img"> <> '' then     X := X + 11;    ParagraphGap := X;    if <DayTasks."AllDay"> then    begin     Frame.Color := clBlack;     Text := '[DayTasks."Title"]';    end    else    begin     Frame.Color := clWindow;     Text := '[DayTasks."CompactTimeStr"] [DayTasks."Title"]';    end;   end; end; procedure PriorityImgOnBeforePrint(Sender: TfrxComponent); begin   with TfrxPictureView(Sender) do   begin    Visible := <Line> <= DayTaskCount;    Left := DayLeft + 4;    Color := <DayTasks."BackgroundColor">;   end; end; procedure CompletionImgOnBeforePrint(Sender: TfrxComponent); begin   with TfrxPictureView(Sender) do   begin    Visible := <Line> <= DayTaskCount;    if <DayTasks."Priority.Img"> = '' then     Left := DayLeft + 5    else     Left := DayLeft + 16;    Color := <DayTasks."BackgroundColor">;   end; end; begin end." PropData="044C65667403940003546F70027408446174617365747301010C1500000020446174615365744E616D653D224D6F6E7468732200010C1300000020446174615365744E616D653D22446179732200010C1700000020446174615365744E616D653D224461795461736B73220000095661726961626C65730100055374796C650100">
  3.   <TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000"/>
  4.   <TfrxReportPage Name="Page1" Orientation="poLandscape" PaperWidth="297" PaperHeight="210" PaperSize="9" LeftMargin="0" RightMargin="81,28" TopMargin="15" BottomMargin="69,167375" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
  5.     <TfrxMasterData Name="MasterData1" Height="115" Left="0" Top="16" Width="815,3202116" OnBeforePrint="CalendarOnBeforePrint" ColumnWidth="0" ColumnGap="0" DataSetName="Months" PrintIfDetailEmpty="True" RowCount="0" StartNewPage="True">
  6.       <TfrxMemoView Name="Memo1" Align="baClient" Left="0" Top="0" Width="815,3202116" Height="115" ShowHint="False" DisplayFormat.FormatStr="mmmm yyyy" DisplayFormat.Kind="fkDateTime" Font.Charset="1" Font.Color="0" Font.Height="-27" Font.Name="Arial" Font.Style="1" Frame.Typ="15" GapX="15" GapY="30" ParentFont="False" Text="[<Months."FirstDay">+7]"/>
  7.       <TfrxSubreport Name="Subreport1" Align="baRight" Left="535,3202116" Top="2" Width="140" Height="115" ShowHint="False" Page="Page2" PrintOnParent="True"/>
  8.       <TfrxSubreport Name="Subreport2" Align="baRight" Left="675,3202116" Top="2" Width="140" Height="115" ShowHint="False" Page="Page2" PrintOnParent="True"/>
  9.     </TfrxMasterData>
  10.     <TfrxDetailData Name="DetailData1" Height="0" Left="0" Top="152" Width="815,3202116" ColumnWidth="0" ColumnGap="0" RowCount="1"/>
  11.     <TfrxDetailData Name="DetailData2" Height="20" Left="0" Top="172" Width="815,3202116" ColumnWidth="0" ColumnGap="0" RowCount="7">
  12.       <TfrxMemoView Name="Memo5" Left="0" Top="0" Width="100" Height="20" OnBeforePrint="WeekDayOnBeforePrint" ShowHint="False" DisplayFormat.FormatStr="dddd" DisplayFormat.Kind="fkDateTime" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="15" HAlign="haCenter" ParentFont="False" VAlign="vaCenter" Text="[<Months."FirstDay">+<Line>-1]"/>
  13.     </TfrxDetailData>
  14.     <TfrxDetailData Name="DetailData3" Height="60" Left="0" Top="212" Width="815,3202116" ColumnWidth="0" ColumnGap="0" DataSetName="Days" PrintIfDetailEmpty="True" RowCount="0">
  15.       <TfrxMemoView Name="Memo6" Left="0" Top="0" Width="100" Height="17" OnBeforePrint="DateOnBeforePrint" ShowHint="False" DataField="Day" DataSetName="Days" DisplayFormat.Kind="fkDateTime" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="1" Frame.Typ="15" GapX="3" ParentFont="False" VAlign="vaCenter" Text="[Days."Day"]"/>
  16.       <TfrxMemoView Name="Memo7" Left="0" Top="17" Width="100" Height="43" OnBeforePrint="DayOnBeforePrint" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-13" Font.Name="Arial" Font.Style="0" Frame.Typ="15" LineSpacing="0" ParentFont="False" Text=""/>
  17.     </TfrxDetailData>
  18.     <TfrxSubdetailData Name="SubdetailData1" Height="12" Left="0" Top="292" Width="815,3202116" ColumnWidth="0" ColumnGap="0" DataSetName="DayTasks" RowCount="0">
  19.       <TfrxMemoView Name="Memo8" Left="2" Top="2" Width="96" Height="11" OnBeforePrint="TaskOnBeforePrint" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-8" Font.Name="Arial" Font.Style="0" Frame.Typ="15" LineSpacing="-1" ParentFont="False" WordWrap="False" Text=""/>
  20.       <TfrxPictureView Name="Picture1" Left="4" Top="5" Width="0" Height="12" OnBeforePrint="PriorityImgOnBeforePrint" ShowHint="False" AutoSize="True" Center="True" FileLink="[DayTasks."Priority.Img"]" Stretched="False" HightQuality="False"/>
  21.       <TfrxPictureView Name="Picture2" Left="18" Top="6" Width="0" Height="8" OnBeforePrint="CompletionImgOnBeforePrint" ShowHint="False" AutoSize="True" Center="True" FileLink="[DayTasks."Completion.Img"]" Stretched="False" HightQuality="False"/>
  22.     </TfrxSubdetailData>
  23.     <TfrxLineView Name="Line1" Left="0" Top="471,36" Width="816" Height="0" ShowHint="False" Frame.Style="fsDash" Frame.Typ="4" Frame.Width="0,5"/>
  24.     <TfrxLineView Name="Line2" Left="816" Top="-56,6929133858268" Width="0" Height="528" ShowHint="False" Frame.Style="fsDash" Frame.Typ="1" Frame.Width="0,5"/>
  25.     <TfrxMemoView Name="Memo14" Left="328" Top="-34" Width="156" Height="16" ShowHint="False" Font.Charset="1" Font.Color="8421504" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="EssentialPIM Printout"/>
  26.     <TfrxMemoView Name="Memo15" Left="328" Top="-22" Width="156" Height="16" ShowHint="False" Font.Charset="1" Font.Color="8421504" Font.Height="-11" Font.Name="Arial" Font.Style="4" HAlign="haCenter" ParentFont="False" Text="www.essentialpim.com"/>
  27.   </TfrxReportPage>
  28.   <TfrxReportPage Name="Page2" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="0" RightMargin="0" TopMargin="0" BottomMargin="0" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
  29.     <TfrxHeader Name="Header1" Height="15" Left="0" Top="18,89765" Width="793,7013" OnBeforePrint="CalHeaderOnBeforePrint">
  30.       <TfrxMemoView Name="Memo2" Left="0" Top="0" Width="119" Height="14" ShowHint="False" DisplayFormat.FormatStr="mmmm yyyy" DisplayFormat.Kind="fkDateTime" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Arial" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="[CalendarStartDate+7]"/>
  31.     </TfrxHeader>
  32.     <TfrxMasterData Name="MasterData2" Height="15" Left="0" Top="56,69295" Width="793,7013" Columns="7" ColumnWidth="17" ColumnGap="0" RowCount="7">
  33.       <TfrxMemoView Name="Memo3" Left="0" Top="0" Width="17" Height="13" ShowHint="False" DisplayFormat.FormatStr="ddd" DisplayFormat.Kind="fkDateTime" Font.Charset="1" Font.Color="0" Font.Height="-9" Font.Name="Arial" Font.Style="0" Frame.Typ="8" HAlign="haCenter" ParentFont="False" Text="[CalendarStartDate+<Line>-1]"/>
  34.     </TfrxMasterData>
  35.     <TfrxMasterData Name="MasterData3" Height="13" Left="0" Top="94,48825" Width="793,7013" Columns="7" ColumnWidth="17" ColumnGap="0" RowCount="42">
  36.       <TfrxMemoView Name="Memo4" Left="0" Top="0" Width="17" Height="13" OnAfterData="CalDayOnAfterData" ShowHint="False" Font.Charset="1" Font.Color="0" Font.Height="-9" Font.Name="Arial" Font.Style="0" HAlign="haCenter" ParentFont="False" Text=""/>
  37.     </TfrxMasterData>
  38.   </TfrxReportPage>
  39. </TfrxReport>
  40.