$PBExportHeader$dw_rp_spt_sub_hz2.srd $PBExportComments$By Kivens.Jiang(kivens@21cn.com) release 9; datawindow ( units=0 timer_interval=60000 color=16777215 processing=1 print.printername="" print.documentname="" print.orientation=0 print.margin.left=110 print.margin.right=110 print.margin.top=96 print.margin.bottom=96 print.paper.size=0 print.paper.source=0 print.canusedefaultprinter=yes grid.lines=0 selected.mouse=yes) header(height=308 color="536870912" ) summary(height=68 color="536870912" ) footer(height=4 color="536870912" ) detail(height=92 color="536870912" height.autosize=yes) table(column=(type=char(50) updatewhereclause=yes name=u_spt_name dbname="u_spt.name" ) column=(type=char(20) updatewhereclause=yes name=u_spt_sptcode dbname="u_spt.sptcode" ) column=(type=decimal(2) updatewhereclause=yes name=oribalcamt dbname="oribalcamt" ) column=(type=decimal(2) updatewhereclause=yes name=credit dbname="credit" ) column=(type=decimal(2) updatewhereclause=yes name=debit dbname="debit" ) column=(type=decimal(2) updatewhereclause=yes name=balcamt dbname="balcamt" ) retrieve="select u_spt.name, u_spt.sptcode, case when cw_subject.dcflag = 1 then (isnull(b.cur_spt_debit,0) + isnull(c.init_spt_debit,0)) - (isnull(b.cur_spt_credit,0) + isnull(c.init_spt_credit,0)) else (isnull(b.cur_spt_credit,0) + isnull(c.init_spt_credit,0)) - (isnull(b.cur_spt_debit,0) + isnull(c.init_spt_debit,0)) end as oribalcamt, isnull(a.credit,0) as credit, isnull(a.debit,0) as debit, case when cw_subject.dcflag = 1 then (isnull(a.debit,0) + isnull(b.cur_spt_debit,0) + isnull(c.init_spt_debit,0)) - (isnull(a.credit,0) + isnull(b.cur_spt_credit,0) + isnull(c.init_spt_credit,0)) else (isnull(a.credit,0) + isnull(b.cur_spt_credit,0) + isnull(c.init_spt_credit,0)) - (isnull(a.debit,0) + isnull(b.cur_spt_debit,0) + isnull(c.init_spt_debit,0)) end as balcamt from cw_subject cross join u_spt left outer join (SELECT uv_dept_bala.sptid, sum(uv_dept_bala.credit) as credit, sum(uv_dept_bala.debit) as debit FROM uv_dept_bala WHERE ( uv_dept_bala.accsetid = :arg_accsetid ) AND uv_dept_bala.cmonth >= :arg_firstcmon AND uv_dept_bala.cmonth <= :arg_endcmon AND uv_dept_bala.subid like :arg_subid_like AND ( uv_dept_bala.postflag = :arg_ifpost or :arg_ifpost = -1 ) GROUP BY uv_dept_bala.sptid ) a on u_spt.sptid = a.sptid left outer join (SELECT uv_dept_bala.sptid, sum(uv_dept_bala.debit) as cur_spt_debit, sum(uv_dept_bala.credit) as cur_spt_credit FROM uv_dept_bala,cw_subject WHERE ( uv_dept_bala.accsetid = cw_subject.accsetid ) AND ( uv_dept_bala.subid = cw_subject.subid ) AND ( cw_subject.detailflag = 1 ) AND ( uv_dept_bala.accsetid = :arg_accsetid ) AND ( uv_dept_bala.cmonth < :arg_firstcmon ) AND ( uv_dept_bala.subid LIKE :arg_subid_like ) AND ( uv_dept_bala.postflag = :arg_ifpost OR :arg_ifpost = -1 ) GROUP BY uv_dept_bala.sptid ) b on u_spt.sptid = b.sptid left outer join (SELECT uv_spt_init.sptid, sum(uv_spt_init.debit) as init_spt_debit, sum(uv_spt_init.credit) as init_spt_credit FROM uv_spt_init,cw_subject WHERE ( uv_spt_init.accsetid = cw_subject.accsetid ) AND ( uv_spt_init.subid = cw_subject.subid ) AND ( cw_subject.detailflag = 1 ) AND ( uv_spt_init.accsetid = :arg_accsetid ) AND ( uv_spt_init.subid LIKE :arg_subid_like ) group by uv_spt_init.sptid ) c on u_spt.sptid = c.sptid where cw_subject.accsetid = :arg_accsetid and cw_subject.subid = :arg_subid and ( :arg_ifspt = -1 or :arg_ifspt = 1 and ( a.credit <> 0 or a.debit <> 0 or b.cur_spt_debit <> 0 or b.cur_spt_credit <> 0 or c.init_spt_debit <> 0 or c.init_spt_credit <> 0 )) " arguments=(("arg_accsetid", number), ("arg_subid", string), ("arg_subid_like", string), ("arg_firstcmon", number), ("arg_endcmon", number), ("arg_ifpost", number), ("arg_ifspt", number)) sort="u_spt_sptcode A" ) text(name=u_spt_name_t visible="1" band=header font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="700" background.mode="2" background.color="1073741824" color="33554432" alignment="2" border="2" x="402" y="248" height="60" width="823" text="供应商" ) text(name=u_spt_sptcode_t visible="1" band=header font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="700" background.mode="2" background.color="1073741824" color="33554432" alignment="2" border="2" x="9" y="248" height="60" width="384" text="编号" ) text(name=oribalcamt_t visible="1" band=header font.charset="0" font.face="Arial" font.family="2" font.height="-10" font.pitch="2" font.weight="700" background.mode="2" background.color="1073741824" color="33554432" alignment="2" border="2" x="1234" y="248" height="64" width="535" text="期初金额" ) text(name=debit_t visible="1" band=header font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="700" background.mode="2" background.color="16777215" color="0" alignment="2" border="2" x="1778" y="248" height="60" width="539" text="累计借方" ) text(name=credit_t visible="1" band=header font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="700" background.mode="2" background.color="16777215" color="0" alignment="2" border="2" x="2327" y="248" height="60" width="512" text="累计贷方" ) text(name=balcamt_t visible="1" band=header font.charset="0" font.face="Arial" font.family="2" font.height="-10" font.pitch="2" font.weight="700" background.mode="2" background.color="1073741824" color="33554432" alignment="2" border="2" x="2848" y="248" height="64" width="507" text="期末金额" ) compute(name=compute_5 visible="1" band=summary font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="400" background.mode="1" background.color="536870912" color="0" x="2327" y="4" height="60" width="512" format="#,##0.00" expression="sum(credit for all)" alignment="1" border="0" crosstab.repeat=no ) compute(name=compute_6 visible="1" band=summary font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="400" background.mode="1" background.color="536870912" color="0" x="1778" y="4" height="60" width="539" format="#,##0.00" expression="sum(debit for all)" alignment="1" border="0" crosstab.repeat=no ) text(name=t_23 visible="1" band=summary font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="400" background.mode="2" background.color="16777215" color="0" alignment="2" border="0" x="9" y="4" height="60" width="384" text="合计" ) compute(name=compute_3 visible="1" band=summary font.charset="134" font.face="宋体" font.family="0" font.height="-9" font.pitch="2" font.weight="700" background.mode="1" background.color="536870912" color="0" x="402" y="4" height="56" width="823" format="[general]" expression="count(u_spt_name for all)" alignment="2" border="0" crosstab.repeat=no ) compute(name=compute_1 visible="1" band=summary font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="400" background.mode="2" background.color="1073741824" color="33554432" x="1234" y="4" height="60" width="535" format="#,##0.00" expression="sum(oribalcamt for all)" alignment="1" border="0" crosstab.repeat=no ) compute(name=compute_2 visible="1" band=summary font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="400" background.mode="2" background.color="1073741824" color="33554432" x="2848" y="4" height="60" width="507" format="#,##0.00" expression="sum(balcamt for all)" alignment="1" border="0" crosstab.repeat=no ) column(name=debit visible="1" band=detail id=5 x="1778" y="12" height="68" width="539" color="0 if( debit =0,rgb(255,255,255),rgb(0,0,0))" border="0" alignment="1" format="#,##0.00" edit.focusrectangle=no edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=u_spt_name visible="1" height.autosize=yes band=detail id=1 x="402" y="12" height="68" width="823" color="0" border="0" alignment="0" format="[general]" edit.focusrectangle=no edit.autohscroll=no edit.autoselect=no edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="134" font.face="宋体" font.family="0" font.height="-9" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=u_spt_sptcode visible="1" band=detail id=2 x="9" y="12" height="68" width="384" color="0" border="0" alignment="0" format="[general]" edit.focusrectangle=no edit.autohscroll=no edit.autoselect=no edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="1" background.color="536870912" font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=credit visible="1" band=detail id=4 x="2327" y="12" height="68" width="512" color="0 if( credit =0,rgb(255,255,255),rgb(0,0,0))" border="0" alignment="1" format="#,##0.00" edit.focusrectangle=no edit.autohscroll=yes edit.autoselect=yes edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="2" background.color="16777215" font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=oribalcamt visible="1" band=detail id=3 x="1234" y="12" height="68" width="535" color="33554432 if( oribalcamt =0,rgb(255,255,255),rgb(0,0,0))" border="0" alignment="1" format="#,##0.00" edit.focusrectangle=no edit.autohscroll=no edit.autoselect=no edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="2" background.color="1073741824" font.charset="134" font.face="宋体" font.family="2" font.height="-10" font.pitch="2" font.weight="400" tabsequence=0 ) column(name=balcamt visible="1" band=detail id=6 x="2848" y="12" height="68" width="507" color="33554432 if( balcamt =0,rgb(255,255,255),rgb(0,0,0))" border="0" alignment="1" format="#,##0.00" edit.focusrectangle=no edit.autohscroll=no edit.autoselect=no edit.autovscroll=no edit.case=any edit.codetable=no edit.displayonly=no edit.hscrollbar=no edit.imemode=0 edit.limit=0 edit.password=no edit.vscrollbar=no edit.validatecode=no edit.nilisnull=no edit.required=no criteria.required=no criteria.override_edit=no crosstab.repeat=no background.mode="2" background.color="1073741824" font.charset="134" font.face="宋体" font.family="2" font.height="-10" font.pitch="2" font.weight="400" tabsequence=0 ) text(name=t_21 visible="1" resizeable=1 band=foreground font.charset="134" font.face="宋体" font.family="0" font.height="-10" font.pitch="2" font.weight="700" background.mode="2" background.color="33554431" color="33554431" alignment="1" border="0" x="0" y="0" height="244" width="3433" text="" ) compute(name=compute_7 visible="1" moveable=1 band=foreground font.charset="134" font.face="宋体" font.family="0" font.height="-9" font.pitch="2" font.weight="400" background.mode="1" background.color="536870912" color="0" x="14" y="168" height="56" width="3191" format="[general]" expression="'期间从:'+ string(arg_firstcmon) + '到:'+ string(arg_endcmon) +',打印时间: '+string(today(),'yyyy-mm-dd')+ ' ' + string(page()) + ' / '+string(pageCount())" alignment="0" border="0" crosstab.repeat=no ) text(name=t_22 visible="1" band=foreground font.charset="134" font.face="宋体" font.family="0" font.height="-22" font.pitch="2" font.weight="700" background.mode="2" background.color="16777215" color="0" alignment="0" border="0" x="14" y="12" height="132" width="1010" text="供应商科目总帐" ) text(name=t_subid visible="1" band=foreground font.charset="134" font.face="宋体" font.family="0" font.height="-9" font.pitch="2" font.weight="700" background.mode="2" background.color="16777215" color="0" alignment="0" border="0" x="1047" y="84" height="56" width="2153" text="" ) htmltable(border="1" ) htmlgen(clientComputedFields="1" clientEvents="1" clientFormatting="0" clientScriptable="0" clientValidation="1" generateJavaScript="1" netscapeLayers="0" netscapelayers="0" encodeSelfLinkArgs="1" ) export.xml(headGroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 ) import.xml() export.pdf(method=0 distill.customPostScript="0" xslfop.print="0" )