<Report ContainerWidth="32000" LayoutWidth="12540" SQLOption="8" FixedPageFooter="-1" TableGridLine="-1" TableHeaderHeight="480" TableFooterHeight="600" TableReportFooterHeight="900">
  <!---->
  <HETLs Server="" Port="" Application="" User="" Password="" />
  <Variants DateFormat="">
    <Variant Name="code" Title="" Type="0" Value="BU201206210001" AllowDisable="0" Used="0" Editable="0" Mode="0" Field="" ParentLabel="" UseBDO="0" BDOID="" BDOName="" BDOAlias="" UseAdvance="0" UseIndex="0" UseSET="0" SETName="" SETAlias="">
      <Linkers />
    </Variant>
    <Variant Name="schr1" Title="" Type="-1" Value="0" Mode="0" Field="" ParentLabel="" UseBDO="0" BDOID="" BDOName="" BDOAlias="" UseAdvance="0" UseIndex="0" UseSET="8301" SETName="" SETAlias="">
      <Linkers />
    </Variant>
    <Variant Name="schr2" Title="" Type="-1" Value="0" Mode="0" Field="" ParentLabel="" UseBDO="0" BDOID="" BDOName="" BDOAlias="" UseAdvance="0" UseIndex="0" UseSET="28486" SETName="" SETAlias="">
      <Linkers />
    </Variant>
  </Variants>
  <Functions />
  <ConvertObjects />
  <DNPaper Arbitrary="-1" />
  <DNDb Type="0" ConnectionString="Provider=SQLOLEDB.1;Password=jxcjjm;Persist Security Info=True;User ID=sa;Initial Catalog=miscm_sql;Data Source=20110824-2205" Server="" Database="" User="" Password="" Sql="select a.Buy_code as '单号',a.Buy_addtime as '开单日期',(select corp_name from x_corp where corp_id=a.Buy_corp)as '供应商名称',a.Buy_linkman as '联系人',a.Buy_mobile as '联系电话',a.Buy_yscode AS '原始单号',(select transportsort_name from x_transportsort where transportsort_id=a.Buy_transportsort) as '配送方式',(select paysort_name from x_paysort where paysort_id=a.Buy_paysort) as '支付方式',(case a.Buy_sendstate when 2 then '已入库'  else '未入库'end) '入库状态',a.buy_sendtime as '入库时间',(case a.Buy_tally when 2 then '已审核'  else '未审核'end) '审核状态',a.buy_tallyman as '审核人',a.buy_tallytime as '入库时间',(select staff_name from x_staff where staff_id=a.Buy_man)as '采购员',a.Buy_mademan as '制单人',a.Buy_money as '报价金额',a.Buy_remark as '备注',c.pro_code as '商品编号',c.pro_name as '商品名称',c.pro_spec as '商品规格',c.pro_mprice as '单价',b.item_rebate as '折扣',b.item_price as '折后单价',b.item_amount as '数量',(select unit_name from x_unit where unit_id=c.pro_unit)as '计量单位',(convert(decimal(18,2),b.item_price)*convert(decimal(18,2),b.item_amount)*convert(decimal(18,2),b.item_rebate)*0.01) as '金额',b.item_remark as '明细备注' from x_Buy a  left join x_Buyitem b on a.Buy_code=b.item_Buy left join x_product c on b.item_pro=c.pro_id where a.Buy_code='{code}'" ProjectPath="" ProjectDbList="" UseBDO="0" BDOID="" BDOName="" BDOAlias="" />
  <DNCrosstab XCondition="0" YCondition="0" YGrandtotal="1" XGrandtotal="1" Section="1">
    <XDNObject Left="0" Top="0" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontBold="1" Align="34" BackColor="15921906" BackStyle="0" BorderDirection="15" BorderColor="0" />
    <YDNObject Left="0" Top="0" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontBold="1" Align="34" BackColor="16771304" BackStyle="0" BorderDirection="15" BorderColor="0" />
    <ZDNObject Left="0" Top="0" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontName="Arial" Align="36" MarginRight="50" BorderDirection="15" BorderColor="0" />
    <XSubtotalDNObject Left="0" Top="0" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontName="Arial" Align="36" MarginRight="50" BackStyle="0" BorderDirection="15" BorderColor="0" />
    <YSubtotalDNObject Left="0" Top="0" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontName="Arial" Align="36" MarginRight="50" BackStyle="0" BorderDirection="15" BorderColor="0" />
    <XGrandtotalDNObject Left="0" Top="0" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontName="Arial" FontBold="1" Align="36" MarginRight="50" BackStyle="0" BorderDirection="15" BorderColor="0" />
    <YGrandtotalDNObject Left="0" Top="0" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontName="Arial" FontBold="1" Align="36" MarginRight="50" BackColor="8454016" BackStyle="0" BorderDirection="15" BorderColor="0" />
    <XSubtotalTitleDNObject Left="0" Top="0" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontBold="1" Align="34" BackColor="15921906" BackStyle="0" BorderDirection="15" BorderColor="0" />
    <YSubtotalTitleDNObject Left="0" Top="0" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontBold="1" Align="34" BackColor="16771304" BackStyle="0" BorderDirection="15" BorderColor="0" />
    <XGrandtotalTitleDNObject Left="0" Top="0" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontBold="1" Align="34" MarginRight="50" BackColor="15921906" BackStyle="0" BorderDirection="15" BorderColor="0" />
    <YGrandtotalTitleDNObject Left="0" Top="0" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontBold="1" Align="34" MarginRight="50" BackColor="8454016" BackStyle="0" BorderDirection="15" BorderColor="0" />
    <AddCols />
  </DNCrosstab>
  <Groups />
  <Sections>
    <Section Name="明细" Type="0" Height="405" BackStyle="1" BackColor="16777215" DesignAlign="128" OnFormat="schr1=CDbl(schr1)+CDbl([数量])&#xA;schr2=CDbl(schr2)+CDbl([金额])">
      <Os>
        <O Name="Field5" Text="[商品编号]" Left="270" Top="0" Width="1800" Height="405" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" DesignAlign="128" FontSize="10" Align="33" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Field7" Text="[商品名称]" Left="2070" Top="0" Width="3600" Height="405" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" DesignAlign="128" FontSize="10" Align="33" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Field9" Text="[计量单位]" Left="5790" Top="0" Width="1170" Height="405" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" DesignAlign="128" FontSize="10" Align="34" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Field11" Text="[数量]" Left="6930" Top="0" Width="1260" Height="405" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" DesignAlign="128" FontSize="10" NumberFormat="0.00" FormatType="2" Align="36" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Field22" Text="[折后单价]" Left="8190" Top="0" Width="1260" Height="405" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" DesignAlign="128" FontSize="10" NumberFormat="0.00" FormatType="2" Align="36" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Field24" Text="[金额]" Left="9450" Top="0" Width="1440" Height="405" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" DesignAlign="128" FontSize="10" NumberFormat="0.00" FormatType="2" Align="36" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
      </Os>
    </Section>
    <Section Name="表头" Type="1" Height="1735" BackStyle="1" BackColor="16777215" OnFormat="">
      <Os>
        <O Name="Field4" Text="[供应商名称]" Left="1260" Top="1440" Width="2970" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" FontName="新宋体" FontSize="10" Align="65" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Label1" Text="采 购 单" Left="3690" Top="360" Width="2970" Height="360" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontName="黑体" FontSize="16" FontBold="1" Align="34" MarginLeft="100" MarginRight="100" ForeColor="255" BorderDirection="15" BorderColor="0" />
        <O Name="Label5" Text="供应商名称：" Left="180" Top="1440" Width="1710" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontName="新宋体" FontSize="10" Align="65" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Label6" Text="配送方式：" Left="4410" Top="1440" Width="1710" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontName="新宋体" FontSize="10" Align="65" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Field17" Text="[配送方式]" Left="5310" Top="1440" Width="2070" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" FontName="新宋体" FontSize="10" Align="65" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Label7" Text="支付方式：" Left="8100" Top="1440" Width="1710" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontName="新宋体" FontSize="10" Align="65" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Field18" Text="[支付方式]" Left="9000" Top="1440" Width="3780" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" FontName="新宋体" FontSize="10" Align="65" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Line3" Left="270" Top="1080" Height="15" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Shape="3" Align="33" BorderStyle="1" BorderDirection="15" BorderColor="0" />
        <O Name="Rectangle1" Text="[单号]" Left="1260" Top="1080" Width="2970" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" FontName="新宋体" FontSize="10" Align="65" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Label2" Text="采购单号：" Left="390" Top="1080" Width="1710" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontName="新宋体" FontSize="10" Align="65" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Label3" Text="原始单号：" Left="4425" Top="1080" Width="1710" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontName="新宋体" FontSize="10" Align="65" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Rectangle2" Text="[原始单号]" Left="5325" Top="1080" Width="2070" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" FontName="新宋体" FontSize="10" Align="65" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Label4" Text="开单日期：" Left="8100" Top="1080" Width="1710" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontName="新宋体" FontSize="10" Align="65" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Rectangle3" Text="[开单日期]" Left="9000" Top="1080" Width="3780" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" FontName="新宋体" FontSize="10" Align="65" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Line4" Left="4500" Top="765" Width="1365" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Shape="3" Align="33" BorderStyle="1" BorderDirection="15" BorderWidth="5" BorderColor="0" />
        <O Name="Line1" Left="4500" Top="810" Width="1365" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Shape="3" Align="33" BorderStyle="1" BorderDirection="15" BorderWidth="5" BorderColor="0" />
      </Os>
    </Section>
    <Section Name="表尾" Type="2" Height="2070" BackStyle="1" BackColor="16777215" OnFormat="sum1.value=schr1&#xA;sum2.value=schr2">
      <Os>
        <O Name="Label11" Text="联系方式：四川绵阳市安昌路18号爱喜嘉年华B座8F" Left="210" Top="165" Width="15" Height="15" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Align="33" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Label12" Text="联系电话：0816-2220160 2239160" Left="5940" Top="540" Width="5040" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontSize="10" Align="36" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Label13" Text="合计" Left="450" Top="0" Width="1530" Height="450" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" FontSize="10" Align="34" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="sum1" Text="Sum([数量])" Left="6930" Top="90" Width="1260" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" FontSize="10" NumberFormat="0.00" FormatType="2" Align="36" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="sum2" Text="Sum([金额])" Left="9630" Top="90" Width="1260" Height="270" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" Calculated="-1" FontSize="10" NumberFormat="0.00" FormatType="2" Align="36" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
      </Os>
    </Section>
    <Section Name="页头" Type="3" Height="490" BackStyle="1" BackColor="16777215" DesignAlign="128" OnFormat="">
      <Os>
        <O Name="Field6" Text="商品编号" Left="540" Top="60" Width="1350" Height="400" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" DesignAlign="128" FontName="新宋体" FontSize="10" Align="34" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Field8" Text="商品名称" Left="3330" Top="60" Width="1620" Height="400" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" DesignAlign="128" FontName="新宋体" FontSize="10" Align="34" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Field10" Text="单位" Left="5940" Top="60" Width="900" Height="400" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" DesignAlign="128" FontName="新宋体" FontSize="10" Align="34" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Field12" Text="数量" Left="7020" Top="60" Width="1080" Height="400" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" DesignAlign="128" FontName="新宋体" FontSize="10" Align="34" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Field23" Text="单价" Left="8370" Top="60" Width="810" Height="400" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" DesignAlign="128" FontName="新宋体" FontSize="10" Align="34" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
        <O Name="Field25" Text="金额" Left="9450" Top="60" Width="1440" Height="400" CellRow="1" CellCol="1" CellSpanRows="1" CellSpanCols="1" DesignAlign="128" FontName="新宋体" FontSize="10" Align="34" MarginLeft="100" MarginRight="100" BorderDirection="15" BorderColor="0" />
      </Os>
    </Section>
    <Section Name="页尾" Type="4" Height="0" BackStyle="1" BackColor="16777215" OnFormat="">
      <Os />
    </Section>
  </Sections>
</Report>