<?xml version="1.0" encoding="utf-8"?>
<TfrxReport Version="5.2.12" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="4095" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="41546.6611873611" ReportOptions.Description.Text="" ReportOptions.LastChange="42101.612863831" ScriptLanguage="PascalScript" ScriptText.Text="&#13;&#10;procedure DialogPage1OnActivate(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;  &#13;&#10;  qry_stock.close ;&#13;&#10;  qry_stock.open ;&#13;&#10;&#13;&#10;  date1.date:=now ;&#13;&#10;  date2.date:=now + 90 ;&#13;&#10;&#13;&#10;&#13;&#10;  cbb_stock.keyvalue:= &#60;MY_STOCK_CODE&#62; ;                                            &#13;&#10;    &#13;&#10;    &#13;&#10;end;&#13;&#10;&#13;&#10;procedure DialogPage1OnShow(Sender: TfrxComponent);&#13;&#10;begin&#13;&#10;                        &#13;&#10;end;&#13;&#10;&#13;&#10;&#13;&#10;&#13;&#10;begin&#13;&#10;&#13;&#10;end.">
  <Datasets>
    <item DataSet="qry_expired_item" DataSetName="inv_md_c"/>
    <item DataSet="qry_stock" DataSetName="stock"/>
  </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_expired_item" UserName="inv_md_c" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" IgnoreDupParams="False" SQL.Text="select i.*,t.*,s.SALE_UNIT,d.DEPT_NAME from INV_MD_C i (NOLOCK) &#13;&#10;left join DRUG_VN  t (NOLOCK) on (i.TRADE_CODE=t.TRADE_CODE)&#13;&#10;left join DRUG_GN  g (NOLOCK) on (g.WORKING_CODE=t.WORKING_CODE)&#13;&#10;left join DEPT_ID d (NOLOCK) on (i.DEPT_ID=d.DEPT_ID)&#13;&#10;left join SALE_UNIT s on (s.SU_ID=g.SALE_UNIT_ID)                                                                                                         &#13;&#10;where i.DEPT_ID=:stock_id&#13;&#10;and i.EXPIRED_DATE BETWEEN :date1 and :date2&#13;&#10;and i.QTY_ON_HAND &#62; 0                                                                &#13;&#10;order by i.EXPIRED_DATE  " SpecificOptions.Text="" PropData="05704C6566740390000470546F7003A0000A506172616D657465727301010C49000000204E616D653D2273746F636B5F6964222044617461547970653D226674537472696E67222045787072657373696F6E3D22262336303B4D595F53544F434B5F434F4445262336323B2200010C54000000204E616D653D226461746531222044617461547970653D226674537472696E67222045787072657373696F6E3D22466F726D61744461746554696D652827595959596D6D6464272C64617465312E64617465292200010C54000000204E616D653D226461746532222044617461547970653D226674537472696E67222045787072657373696F6E3D22466F726D61744461746554696D652827595959596D6D6464272C64617465322E6461746529220000"/>
    <TfrxUniDACQuery Name="qry_stock" UserName="stock" CloseDataSource="True" FieldAliases.Text="" BCDToCurrency="False" IgnoreDupParams="False" SQL.Text="select * from DEPT_ID (NOLOCK) where HIDE='' or HIDE is null  " SpecificOptions.Text="" PropData="05704C6566740304010470546F7003AC000A506172616D65746572730100"/>
  </TfrxDataPage>
  <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" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="128.50402" Left="0" Top="16" Width="718.1107">
      <TfrxMemoView Name="Memo2" Left="2" Top="3.77953" Width="714.33117" Height="56.69295" Font.Charset="1" Font.Color="0" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="1" HAlign="haCenter" ParentFont="False" Text="สำรวจรายการยาที่กำลังจะหมดอายุ&#13;&#10;คลัง:  [TRIM(cbb_stock.text)]"/>
      <TfrxLineView Name="Line1" Left="3.77953" Top="99.25201" Width="710.55164" Height="0" Color="0" Frame.Color="12632256" Diagonal="True"/>
      <TfrxLineView Name="Line2" Left="3.77953" Top="124.92919" Width="710.55164" Height="0" Color="0" Frame.Color="12632256" Diagonal="True"/>
      <TfrxMemoView Name="Memo4" Left="132.28355" Top="100.47248" Width="56.69295" Height="22.67718" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="ชื่อยา"/>
      <TfrxMemoView Name="Memo5" Left="417.88219" Top="99.47248" Width="45.35436" Height="22.67718" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="Lot No."/>
      <TfrxMemoView Name="Memo6" Left="483.91373" Top="99.25201" Width="79.37013" Height="22.67718" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="วันหมดอายุ"/>
      <TfrxMemoView Name="Memo7" Left="603.07916" Top="99.47248" Width="90.70872" Height="22.67718" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="จน.คงคลัง"/>
      <TfrxMemoView Name="Memo8" Left="334.17347" Top="99.47248" Width="64.25201" Height="22.67718" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haCenter" ParentFont="False" Text="หน่วยนับ"/>
      <TfrxMemoView Name="Memo3" Left="1.77953" Top="68.91342" Width="714.33117" Height="26.45671" Font.Charset="1" Font.Color="0" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="วันหมดอายุ    ตั้งแต่วันที่ [formatdatetime('dd/mm/YYYY',date1.date)] ถึงวันที่  [formatdatetime('dd/mm/YYYY',date2.date)] "/>
    </TfrxReportTitle>
    <TfrxMasterData Name="MasterData1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="30.23624" Left="0" Top="164" Width="718.1107" ColumnWidth="0" ColumnGap="0" DataSet="qry_expired_item" DataSetName="inv_md_c" RowCount="0">
      <TfrxMemoView Name="inv_md_cQTY_ON_HAND" Left="561.50433" Top="1.77953" Width="117.16543" Height="26.45671" DataSet="qry_expired_item" DataSetName="inv_md_c" DisplayFormat.FormatStr="%2.0n" DisplayFormat.Kind="fkNumeric" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[TRUNc(&#60;inv_md_c.&#34;QTY_ON_HAND&#34;&#62;/&#60;inv_md_c.&#34;PACK_RATIO&#34;&#62;)] x [inv_md_c.&#34;PACK_RATIO&#34;] | [&#60;inv_md_c.&#34;QTY_ON_HAND&#34;&#62; mod &#60;inv_md_c.&#34;PACK_RATIO&#34;&#62;]"/>
      <TfrxMemoView Name="inv_md_cTRADE_NAME" Left="5.77953" Top="1.77953" Width="302.3624" Height="26.45671" DataSet="qry_expired_item" DataSetName="inv_md_c" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" Text="[Line#]. [inv_md_c.&#34;TRADE_NAME&#34;]"/>
      <TfrxMemoView Name="inv_md_cEXPIRED_DATE" Left="489.91373" Top="1.77953" Width="60.47248" Height="26.45671" DataSet="qry_expired_item" DataSetName="inv_md_c" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[COPY(&#60;inv_md_c.&#34;EXPIRED_DATE&#34;&#62;,7,2)]/[COPY(&#60;inv_md_c.&#34;EXPIRED_DATE&#34;&#62;,5,2)]/[COPY(&#60;inv_md_c.&#34;EXPIRED_DATE&#34;&#62;,1,4)]"/>
      <TfrxMemoView Name="inv_md_cLOT_NO" Left="391.42548" Top="1.77953" Width="64.25201" Height="26.45671" DataSet="qry_expired_item" DataSetName="inv_md_c" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[TRIM(&#60;inv_md_c.&#34;LOT_NO&#34;&#62;)]"/>
      <TfrxMemoView Name="inv_md_cSALE_UNIT" Left="318.71676" Top="1" Width="64.25201" Height="26.45671" DataField="SALE_UNIT" DataSet="qry_expired_item" DataSetName="inv_md_c" Font.Charset="1" Font.Color="0" Font.Height="-19" Font.Name="AngsanaUPC" Font.Style="0" HAlign="haRight" ParentFont="False" Text="[inv_md_c.&#34;SALE_UNIT&#34;]"/>
    </TfrxMasterData>
    <TfrxPageFooter Name="PageFooter1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Height="22.67718" Left="0" Top="216" Width="718.1107">
      <TfrxMemoView Name="Memo1" Left="642.5201" Top="0" Width="75.5906" Height="18.89765" HAlign="haRight" Text="[Page#]"/>
    </TfrxPageFooter>
  </TfrxReportPage>
  <TfrxDialogPage Name="DialogPage1" Font.Charset="1" Font.Color="-16777208" Font.Height="-13" Font.Name="Arial" Font.Style="0" Color="16770263" Height="346" ClientHeight="308" Left="371" Top="208" Width="531" ClientWidth="515" OnActivate="DialogPage1OnActivate">
    <TfrxDBLookupComboBox Name="cbb_stock" Left="104" Top="150" Width="333" Height="37" Font.Charset="0" Font.Color="-16777208" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" ShowHint="True" DataSet="qry_stock" DataSetName="stock" ListField="DEPT_NAME" KeyField="DEPT_ID" DropDownWidth="0" DropDownRows="7"/>
    <TfrxDateEditControl Name="date1" Left="168" Top="70" Width="97" Height="25" ShowHint="True" Color="-16777211" Date="41559.6971358681" Time="41559.6971358681" WeekNumbers="False"/>
    <TfrxDateEditControl Name="date2" Left="336" Top="70" Width="101" Height="25" ShowHint="True" Color="-16777211" Date="41559.6971358681" Time="41559.6971358681" WeekNumbers="False"/>
    <TfrxBitBtnControl Name="" Left="216" Top="224" 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="28" Top="68" Width="124" Height="29" Font.Charset="0" Font.Color="-16777208" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" ShowHint="True" Caption="ѹ ѹ" Color="16768462"/>
    <TfrxLabelControl Name="Label2" Left="284" Top="68" Width="41" Height="29" Font.Charset="0" Font.Color="-16777208" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" ShowHint="True" Caption="֧ѹ" Color="16768462"/>
    <TfrxLabelControl Name="Label3" Left="44" Top="152" Width="51" Height="29" Font.Charset="0" Font.Color="-16777208" Font.Height="-21" Font.Name="AngsanaUPC" Font.Style="0" ParentFont="False" ShowHint="True" Caption="͡ѧ" Color="16768462"/>
  </TfrxDialogPage>
</TfrxReport>
