<?xml version="1.0" encoding="utf-8"?>
<TfrxReport Version="5.4.6" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="42119.8655733102" ReportOptions.Description.Text="" ReportOptions.LastChange="42684.5523655903" ScriptLanguage="PascalScript" ScriptText.Text="&#13;&#10;procedure DialogPage1OnActivate(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;  date1.date:=now - 30  ;&#13;&#10;  date2.date:=now  ;&#13;&#10;                                       &#13;&#10;end;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;begin&#13;&#10;&#13;&#10;end.">
  <Datasets>
    <item DataSet="qry_rp1" DataSetName="rp1"/>
    <item DataSet="qry_dept" DataSetName="dept"/>
  </Datasets>
  <Variables>
    <item Name="MY_STOCK_CODE"/>
    <item Name="MY_STOCK_NAME"/>
  </Variables>
  <TfrxDataPage Name="Data" Height="1000" Left="0" Top="0" Width="1000">
    <TfrxUniDACQuery Name="qry_rp1" UserName="rp1" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" IgnoreDupParams="False" SQL.Text="select dbo.cymd2be(REQ_DATE) as REQDATE,d.DRUG_NAME,a.QTY_REQ/a.PACK_RATIO as REQ_PACK,a.*,d1.DEPT_NAME,a.QTY_REQ-a.QTY_DIST as QTY&#13;&#10;,a.QTY_DIST/a.PACK_RATIO as DIST_PACK,d1.DEPT_NAME                                          &#13;&#10;from ACCR_DISP a  (NOLOCK)&#13;&#10;left join DRUG_GN d on (a.WORKING_CODE = d.WORKING_CODE)&#13;&#10;left join DEPT_ID d1 (NOLOCK) on (d1.DEPT_ID = a.DEPT_ID)&#13;&#10;where REQ_DATE between :d1 and :d2&#13;&#10;and a.QTY_REQ &#62; a.QTY_DIST and a.DEL_FLAG='N'&#13;&#10;order by a.DEPT_ID,a.REQ_DATE,d.DRUG_NAME&#13;&#10;  " SpecificOptions.Text="" PropData="05704C656674034C010470546F7003C0000A506172616D657465727301010C51000000204E616D653D226431222044617461547970653D226674537472696E67222045787072657373696F6E3D22466F726D61744461746554696D652827595959596D6D6464272C64617465312E64617465292200010C51000000204E616D653D226432222044617461547970653D226674537472696E67222045787072657373696F6E3D22466F726D61744461746554696D652827595959596D6D6464272C64617465322E6461746529220000"/>
    <TfrxUniDACQuery Name="qry_dept" UserName="dept" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" IgnoreDupParams="False" SQL.Text="select * from DEPT_ID (NOLOCK) where (HIDE is null or HIDE='' or HIDE='N') and DEPT_TYPE=2                                                                                                " SpecificOptions.Text="" PropData="05704C656674034C010470546F700308010A506172616D65746572730100"/>
  </TfrxDataPage>
  <TfrxReportPage Name="Page1" PaperWidth="210" PaperHeight="297" PaperSize="9" LeftMargin="5" RightMargin="5" TopMargin="5" BottomMargin="5" ColumnWidth="0" ColumnPositions.Text="" HGuides.Text="" VGuides.Text="">
    <TfrxPageHeader Name="PageHeader1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="113.3859" Left="0" Top="18.89765" Width="755.906">
      <TfrxMemoView Name="Memo1" Left="3" Top="15.33859" Width="748.34694" Height="52.91342" Font.Charset="1" Font.Color="-16777208" Font.Height="-21" Font.Name="TH SarabunPSK" Font.Style="1" HAlign="haCenter" ParentFont="False" Text="รายการยาค้างจ่าย&#13;&#10;ตั้งแต่เดือน  [formatdatetime('dd/mm/YYYY',date1.date)] ถึงเดือน  [formatdatetime('dd/mm/YYYY',date2.date)]"/>
      <TfrxLineView Name="Line1" Left="2" Top="83.14966" Width="752.12647" Height="0" Color="0" Frame.Color="13421772" Frame.Typ="4"/>
      <TfrxLineView Name="Line2" Left="1.77953" Top="110.3859" Width="752.12647" Height="0" Color="0" Frame.Color="13421772" Frame.Typ="4"/>
      <TfrxMemoView Name="Memo2" Left="138.3859" Top="84.92919" Width="30.23624" Height="22.67718" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" Text="ชื่อยา"/>
      <TfrxMemoView Name="Memo4" Left="378.66945" Top="84.92919" Width="41.57483" Height="22.67718" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" Text="วันที่ขอ"/>
      <TfrxMemoView Name="Memo5" Left="460.88219" Top="84.92919" Width="52.91342" Height="22.67718" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" Text="จำนวนขอ"/>
      <TfrxMemoView Name="Memo6" Left="594.38621" Top="85.14966" Width="68.03154" Height="22.67718" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" Text="จน. จ่ายแล้ว"/>
      <TfrxMemoView Name="Memo7" Left="672.53587" Top="84.92919" Width="68.03154" Height="22.67718" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" Text="จน. ค้างจ่าย"/>
      <TfrxMemoView Name="Memo8" Left="521.1342" Top="84.92919" Width="60.47248" Height="22.67718" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" Text="ขนาดบรรจุ"/>
      <TfrxMemoView Name="Memo9" Left="513.23655" Top="88.14966" Width="11.33859" Height="18.89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-15" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" Text="X"/>
    </TfrxPageHeader>
    <TfrxPageFooter Name="PageFooter1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="22.67718" Left="0" Top="366.61441" Width="755.906"/>
    <TfrxMasterData Name="MasterData1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="26.45671" Left="0" Top="241.88992" Width="755.906" ColumnWidth="0" ColumnGap="0" DataSet="qry_rp1" DataSetName="rp1" RowCount="0">
      <TfrxMemoView Name="rp1RCV_DATE" Left="23.89765" Top="1" Width="343.93723" Height="22.67718" DataSet="qry_rp1" DataSetName="rp1" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" Text="[rp1.&#34;DRUG_NAME&#34;]">
        <Formats>
          <item/>
          <item/>
        </Formats>
      </TfrxMemoView>
      <TfrxMemoView Name="rp1REQ_DATE" Left="336.37817" Top="1" Width="105.82684" Height="22.67718" DataSet="qry_rp1" DataSetName="rp1" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[rp1.&#34;REQDATE&#34;]"/>
      <TfrxMemoView Name="rp1QTY_REQ" Left="443.98454" Top="1" Width="64.25201" Height="22.67718" DataSet="qry_rp1" DataSetName="rp1" DisplayFormat.FormatStr="%2.0n" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[rp1.&#34;REQ_PACK&#34;]"/>
      <TfrxMemoView Name="Memo10" Left="510.23655" Top="3" Width="11.33859" Height="18.89765" Font.Charset="1" Font.Color="-16777208" Font.Height="-15" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" Text="X"/>
      <TfrxMemoView Name="rp1PACK_RATIO" Left="523.35467" Top="0.77953" Width="52.91342" Height="22.67718" DataField="PACK_RATIO" DataSet="qry_rp1" DataSetName="rp1" DisplayFormat.FormatStr="%2.0n" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" ParentFont="False" Text="[rp1.&#34;PACK_RATIO&#34;]"/>
      <TfrxMemoView Name="Memo11" Left="585.26809" Top="1" Width="64.25201" Height="22.67718" DataSet="qry_rp1" DataSetName="rp1" DisplayFormat.FormatStr="%2.0n" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[rp1.&#34;DIST_PACK&#34;]"/>
      <TfrxMemoView Name="Memo12" Left="660.41775" Top="1" Width="64.25201" Height="22.67718" DataSet="qry_rp1" DataSetName="rp1" DisplayFormat.FormatStr="%2.0n" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[&#60;rp1.&#34;REQ_PACK&#34;&#62;-&#60;rp1.&#34;DIST_PACK&#34;&#62;]"/>
    </TfrxMasterData>
    <TfrxGroupHeader Name="GroupHeader1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="26.45671" Left="0" Top="192.75603" Width="755.906" Condition="rp1.&#34;DEPT_ID&#34;" KeepTogether="True" StartNewPage="True">
      <TfrxMemoView Name="Memo3" Left="5" Top="2" Width="317.48052" Height="22.67718" Font.Charset="1" Font.Color="-16777208" Font.Height="-19" Font.Name="TH SarabunPSK" Font.Style="1" ParentFont="False" Text="คลัง [rp1.&#34;DEPT_NAME&#34;]"/>
    </TfrxGroupHeader>
    <TfrxGroupFooter Name="GroupFooter1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="15.11812" Left="0" Top="291.02381" Width="755.906"/>
  </TfrxReportPage>
  <TfrxDialogPage Name="DialogPage1" Font.Charset="1" Font.Color="0" Font.Height="-11" Font.Name="Tahoma" Font.Style="0" BorderStyle="bsDialog" Caption="¡Ҥҧ" Color="16770263" Height="312" ClientHeight="274" Left="477" Position="poMainFormCenter" Top="231" Width="521" ClientWidth="505" OnActivate="DialogPage1OnActivate">
    <TfrxDateEditControl Name="date1" Left="132" Top="67" Width="117" Height="25" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="MS Sans Serif" Font.Style="0" ParentFont="False" ShowHint="True" Color="-16777211" Date="41559.6971358681" Time="41559.6971358681" WeekNumbers="False"/>
    <TfrxDateEditControl Name="date2" Left="308" Top="67" Width="117" Height="25" Font.Charset="1" Font.Color="0" Font.Height="-16" Font.Name="MS Sans Serif" Font.Style="0" ParentFont="False" ShowHint="True" Color="-16777211" Date="41559.6971358681" Time="41559.6971358681" WeekNumbers="False"/>
    <TfrxBitBtnControl Name="BitBtn1" Left="204" Top="168" Width="87" Height="33" Font.Charset="0" Font.Color="-16777208" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" ShowHint="True" Glyph.PropData="04446174610AE2010000DE010000424DDE01000000000000760000002800000024000000120000000100040000000000680100000000000000000000100000000000000000000000000080000080000000808000800000008000800080800000C0C0C000808080000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF003333333333333333333333333333333333330000333333333333333333333333F3333333333300003333344333333333333333388F3333333333000033334224333333333333338338F3333333330000333422224333333333333833338F3333333300003342222224333333333383333338F3333333000034222A22224333333338F338F3338F33333300003222A3A2224333333338F3838F338F33333300003A2A333A222433333338F83338F338F33333000033A33333A222433333338333338F338F33330000333333333A222433333333333338F338F33300003333333333A222433333333333338F338F33000033333333333A222433333333333338F338F30000333333333333A222433333333333338F338F00003333333333333A224333333333333338F38F000033333333333333A223333333333333338F830000333333333333333A3333333333333333383300003333333333333333333333333333333333330000" Kind="bkOK" Caption="OK" ModalResult="1" NumGlyphs="2"/>
    <TfrxLabelControl Name="Label1" Left="60" Top="72" Width="60" Height="20" Font.Charset="0" Font.Color="-16777208" Font.Height="-16" Font.Name="MS Sans Serif" Font.Style="0" ParentFont="False" ShowHint="True" Caption="ѹ" Color="16768462"/>
    <TfrxLabelControl Name="Label2" Left="260" Top="69" Width="42" Height="20" Font.Charset="0" Font.Color="-16777208" Font.Height="-16" Font.Name="MS Sans Serif" Font.Style="0" ParentFont="False" ShowHint="True" Caption="֧ѹ" Color="16768462"/>
  </TfrxDialogPage>
</TfrxReport>
