$PBExportHeader$dw_rp_subid_hz_2_mx.srd $PBExportComments$By Kivens.Jiang(kivens@21cn.com) release 9; datawindow ( units=0 timer_interval=60000 color=16777215 processing=1 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 grid.lines=0 selected.mouse=yes) header(height=68 color="536870912" ) summary(height=0 color="536870912" ) footer(height=0 color="536870912" ) detail(height=84 color="536870912" ) table(column=(type=long updatewhereclause=yes name=yearmon dbname="cw_Balance.YearMon" ) column=(type=decimal(2) updatewhereclause=yes name=debit dbname="cw_Balance.Debit" ) column=(type=decimal(2) updatewhereclause=yes name=credit dbname="cw_Balance.Credit" ) column=(type=decimal(2) updatewhereclause=yes name=balc dbname="balc" ) column=(type=char(8) updatewhereclause=yes name=brief dbname="brief" ) column=(type=long updatewhereclause=yes name=dw_sort dbname="cw_Balance.dw_sort" ) retrieve=" SELECT cw_Balance.YearMon, null as Debit, null as Credit, case sum(cw_Balance.bDebit) - sum(cw_Balance.bCredit) when 0 then null else sum(cw_Balance.bDebit) - sum(cw_Balance.bCredit) end as balc, '期初余额' as brief, 0 as dw_sort FROM cw_Balance, cw_subject WHERE cw_Balance.accsetid = cw_subject.accsetid and cw_Balance.subid = cw_subject.subid and ( cw_Balance.accsetid = :arg_accsetid ) AND (cw_Balance.subaccsetid = :arg_subaccsetid ) AND cw_Balance.SubID = :arg_subid AND cw_Balance.YearMon = :arg_firstcmonth GROUP BY cw_Balance.YearMon, cw_subject.subid, cw_subject.name union SELECT cw_Balance.YearMon, case sum(cw_Balance.Debit) when 0 then null else sum(cw_Balance.Debit) end as Debit, case sum(cw_Balance.Credit) when 0 then null else sum(cw_Balance.Credit) end as Credit, case sum(cw_Balance.eDebit) - sum(cw_Balance.eCredit) when 0 then null else sum(cw_Balance.eDebit) - sum(cw_Balance.eCredit) end as balc, '本期合计' as brief, 1 as dw_sort FROM cw_Balance , cw_subject WHERE cw_Balance.accsetid = cw_subject.accsetid and cw_Balance.subid = cw_subject.subid and ( cw_Balance.accsetid = :arg_accsetid ) AND (cw_Balance.subaccsetid = :arg_subaccsetid ) AND cw_Balance.SubID = :arg_subid AND cw_Balance.YearMon >= :arg_firstcmonth AND cw_Balance.YearMon <= :arg_endcmonth GROUP BY cw_subject.SubID, cw_subject.name, cw_Balance.YearMon union SELECT cw_Balance.YearMon, case sum(cw_Balance.yDebit) when 0 then null else sum(cw_Balance.yDebit) end as Debit, case sum(cw_Balance.yCredit) when 0 then null else sum(cw_Balance.yCredit) end as Credit, case sum(cw_Balance.ybDebit) - sum(cw_Balance.ybCredit) + sum(cw_Balance.yDebit) - sum(cw_Balance.yCredit) when 0 then null else sum(cw_Balance.ybDebit) - sum(cw_Balance.ybCredit) + sum(cw_Balance.yDebit) - sum(cw_Balance.yCredit) end as balc, '本年累计' as brief, 2 as dw_sort FROM cw_Balance, cw_subject WHERE cw_Balance.accsetid = cw_subject.accsetid and cw_Balance.subid = cw_subject.subid and ( cw_Balance.accsetid = :arg_accsetid ) AND (cw_Balance.subaccsetid = :arg_subaccsetid ) AND cw_Balance.SubID = :arg_subid AND cw_Balance.YearMon >= :arg_firstcmonth AND cw_Balance.YearMon <= :arg_endcmonth GROUP BY cw_subject.SubID, cw_subject.name, cw_Balance.YearMon " arguments=(("arg_accsetid", number), ("arg_subaccsetid", number), ("arg_firstcmonth", number), ("arg_endcmonth", number), ("arg_subid", string)) sort="yearmon A, dw_sort A" ) text(name=yearmon_t band=header 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" alignment="2" border="0" x="9" y="8" height="56" width="375" text="期间" ) text(name=brief_t band=header font.charset="134" font.face="宋体" font.family="0" font.height="-9" font.pitch="2" font.weight="400" background.mode="2" background.color="16777215" color="0" alignment="2" border="0" x="393" y="8" height="56" width="654" text="摘要" ) text(name=debit_t band=header 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" alignment="2" border="0" x="1056" y="8" height="56" width="658" text="借方" ) text(name=credit_t band=header 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" alignment="2" border="0" x="1723" y="8" height="56" width="640" text="贷方" ) text(band=header 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" alignment="0" border="0" x="2373" y="8" height="56" width="160" text="" ) text(band=header 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" alignment="2" border="0" x="2542" y="8" height="56" width="672" text="余额" ) column(name=yearmon tag="月份" band=detail id=1 x="9" y="8" height="72" width="375" color="0" border="0" alignment="2" format="[general]" 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=brief band=detail id=5 x="393" y="8" height="72" width="654" color="0" border="0" alignment="2" format="[general]" edit.autohscroll=no 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=debit band=detail id=2 x="1056" y="8" height="72" width="658" color="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=credit band=detail id=3 x="1723" y="8" height="72" width="640" color="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 ) compute(name=obj_8808606 band=detail 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="2373" y="8" height="72" width="160" format="[general]" expression="if( balc =0 or isnull(balc),'平',if( balc >0,'借','贷'))" alignment="2" border="0" crosstab.repeat=no ) compute(band=detail 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="2542" y="8" height="72" width="672" format="#,##0.00" expression="abs( balc )" alignment="1" border="0" crosstab.repeat=no ) sparse(names="yearmon") htmltable(border="1" cellPadding="0" cellSpacing="0" generateCSS="no" noWrap="yes" ) htmlgen() export.xml(metadatatype=0 savemetadata=0 ) import.xml() export.pdf(method=0 )