dw_rp_subid_mx_wb.srd 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. $PBExportHeader$dw_rp_subid_mx_wb.srd
  2. $PBExportComments$By Kivens.Jiang(kivens@21cn.com)
  3. release 9;
  4. 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)
  5. header(height=416 color="536870912" )
  6. summary(height=0 color="536870912" )
  7. footer(height=0 color="536870912" )
  8. detail(height=76 color="536870912" )
  9. table(column=(type=datetime updatewhereclause=yes name=creddate dbname="cw_Balance.creddate" )
  10. column=(type=long updatewhereclause=yes name=cmonth dbname="cw_Balance.cmonth" )
  11. column=(type=long updatewhereclause=yes name=credno dbname="credno" )
  12. column=(type=char(255) updatewhereclause=yes name=cw_credencemx_brief dbname="brief" )
  13. column=(type=decimal(2) updatewhereclause=yes name=debit dbname="cw_Balance.Debit" )
  14. column=(type=decimal(2) updatewhereclause=yes name=credit dbname="cw_Balance.Credit" )
  15. column=(type=decimal(10) updatewhereclause=yes name=rate dbname="cw_Balance.rate" )
  16. column=(type=decimal(2) updatewhereclause=yes name=rawdebit dbname="cw_Balance.rawdebit" )
  17. column=(type=decimal(2) updatewhereclause=yes name=rawcredit dbname="cw_Balance.rawcredit" )
  18. column=(type=decimal(2) updatewhereclause=yes name=balc dbname="balc" )
  19. column=(type=decimal(2) updatewhereclause=yes name=rawbalc dbname="rawbalc" )
  20. column=(type=long updatewhereclause=yes name=dw_sort dbname="dw_sort" )
  21. column=(type=long updatewhereclause=yes name=fuluno dbname="fuluno" )
  22. column=(type=long updatewhereclause=yes name=credid dbname="credid" )
  23. retrieve=" SELECT null as creddate,
  24. cw_Balance.YearMon as cmonth,
  25. 0 as credno,
  26. '期初余额' as brief,
  27. null as Debit,
  28. null as Credit,
  29. null as rate,
  30. null as rawdebit,
  31. null as rawcredit,
  32. case isnull(cw_Balance.bDebit,0) - isnull(cw_Balance.bCredit,0) when 0 then null else isnull(cw_Balance.bDebit,0) - isnull(cw_Balance.bCredit,0) end as balc,
  33. case isnull(cw_Balance.brawDebit,0) - isnull(cw_Balance.brawCredit,0) when 0 then null else isnull(cw_Balance.brawDebit,0) - isnull(cw_Balance.brawCredit,0) end as rawbalc,
  34. 0 as dw_sort,
  35. 0 as fuluno,
  36. 0 as credid
  37. FROM cw_Balance
  38. WHERE ( cw_Balance.accsetid = :arg_accsetid ) AND
  39. ( cw_Balance.subaccsetid = :arg_subaccsetid ) AND
  40. ( cw_Balance.SubID = :arg_subid ) AND
  41. ( cw_Balance.YearMon >= :arg_firstmon or cw_Balance.YearMon is null ) AND
  42. ( cw_Balance.YearMon <= :arg_endmon or cw_Balance.YearMon is null )
  43. union all
  44. SELECT cw_credence.creddate as creddate,
  45. cw_credence.cmonth as cmonth,
  46. cw_credence.credno as credno,
  47. case :arg_rel when 1 then
  48. ltrim(rtrim(cw_credencemx.brief)) + ' ' +
  49. case len(ltrim(rtrim(cw_credence.reldcode))) when 0 then '' else '相关号:'+ltrim(rtrim(cw_credence.reldcode)) end + ' '+
  50. case reldate when null then '' else '相关日期:'+ convert(char(4),year(reldate))+'-'+convert(char(2),month(reldate))+'-'+ convert(char(2),day(reldate)) end
  51. else
  52. ltrim(rtrim(cw_credencemx.brief)) + ' ' +
  53. case len(ltrim(rtrim(cw_credence.reldcode))) when 0 then '' else '相关号:'+ltrim(rtrim(cw_credence.reldcode)) + ' '+
  54. case reldate when null then '' else '相关日期:'+ convert(char(4),year(reldate))+'-'+convert(char(2),month(reldate))+'-'+ convert(char(2),day(reldate)) end end end
  55. + case when cw_credencemx.deptid = 0 then '' else '(部门:'+rtrim(cw_department.departmentname)+')' end +
  56. case when cw_credencemx.itemid = 0 then '' else '(项目:'+rtrim(cw_hsitem.hsitemname)+')' end +
  57. case when cw_credencemx.cusid = 0 then '' else '(客户:'+rtrim(u_cust.name)+')' end +
  58. case when cw_credencemx.sptid = 0 then '' else '(供应商:'+rtrim(u_spt.name)+')'end as brief,
  59. case cw_credencemx.debit when 0 then null else cw_credencemx.debit end as debit,
  60. case cw_credencemx.credit when 0 then null else cw_credencemx.credit end as credit ,
  61. case cw_credencemx.rate when 0 then null else cw_credencemx.rate end as rate,
  62. case cw_credencemx.rawdebit when 0 then null else cw_credencemx.rawdebit end as rawdebit,
  63. case cw_credencemx.rawcredit when 0 then null else cw_credencemx.rawcredit end as rawcredit ,
  64. 0.00 as balc,
  65. 0.00 as rawbalc,
  66. 1 as dw_sort,
  67. cw_credencemx.fuluno as fuluno ,
  68. cw_credence.credid as credid
  69. FROM cw_credence,
  70. cw_credencemx
  71. left outer join cw_department on cw_credencemx.deptid = cw_department.departmentid
  72. left outer join cw_hsitem on cw_credencemx.itemid = cw_hsitem.hsitemid
  73. left outer join u_cust on cw_credencemx.cusid = u_cust.cusid
  74. left outer join u_spt on cw_credencemx.sptid = u_spt.sptid
  75. WHERE ( cw_credence.accsetid = cw_credencemx.accsetid ) and
  76. ( cw_credence.subaccsetid = cw_credencemx.subaccsetid ) and
  77. ( cw_credence.credid = cw_credencemx.credid ) and
  78. ( ( cw_credence.accsetid = :arg_accsetid ) AND
  79. ( cw_credence.subaccsetid = :arg_subaccsetid or :arg_subaccsetid = -1) AND
  80. ( cw_credence.cmonth >= :arg_firstmon ) AND
  81. ( cw_credence.cmonth <= :arg_endmon ) AND
  82. ( cw_credence.postflag = :arg_if_post or :arg_if_post = -1 ) AND
  83. ( left(cw_credencemx.subid,:arg_subid_len) = :arg_subid ) )
  84. union all
  85. SELECT null as creddate,
  86. cw_credence.cmonth as cmonth,
  87. 0 as credno,
  88. '本期合计' as brief,
  89. case sum(cw_credencemx.debit) when 0 then null else sum(cw_credencemx.debit) end as debit,
  90. case sum(cw_credencemx.Credit) when 0 then null else sum(cw_credencemx.Credit) end as Credit,
  91. null as rate,
  92. case sum(cw_credencemx.rawdebit) when 0 then null else sum(cw_credencemx.rawdebit) end as rawdebit,
  93. case sum(cw_credencemx.rawCredit) when 0 then null else sum(cw_credencemx.rawCredit) end as rawCredit,
  94. 0.00 as balc,
  95. 0.00 as rawbalc,
  96. 2 as dw_sort,
  97. 0 as fuluno,
  98. 0 as credid
  99. FROM cw_credence,
  100. cw_credencemx
  101. WHERE ( cw_credence.accsetid = cw_credencemx.accsetid ) and
  102. ( cw_credence.subaccsetid = cw_credencemx.subaccsetid ) and
  103. ( cw_credence.credid = cw_credencemx.credid ) and
  104. ( ( cw_credence.accsetid = :arg_accsetid ) AND
  105. ( cw_credence.subaccsetid = :arg_subaccsetid or :arg_subaccsetid = -1 ) AND
  106. ( cw_credence.cmonth >= :arg_firstmon ) AND
  107. ( cw_credence.cmonth <= :arg_endmon ) AND
  108. ( cw_credence.postflag = :arg_if_post or :arg_if_post = -1 ) AND
  109. ( left(cw_credencemx.subid,:arg_subid_len) = :arg_subid ) )
  110. group by cw_credence.cmonth
  111. union
  112. SELECT null as creddate,
  113. cw_Balance.YearMon as cmonth,
  114. 0 as credno,
  115. '本年累计' as brief,
  116. case cw_Balance.yDebit when 0 then null else cw_Balance.yDebit end as debit,
  117. case cw_Balance.yCredit when 0 then null else cw_Balance.yCredit end as Credit,
  118. null as rate,
  119. case cw_Balance.yrawDebit when 0 then null else cw_Balance.yrawDebit end as yrawDebit,
  120. case cw_Balance.yrawCredit when 0 then null else cw_Balance.yrawCredit end as yrawCredit,
  121. case cw_Balance.ybDebit - cw_Balance.ybCredit + cw_Balance.yDebit - cw_Balance.yCredit when 0 then null else cw_Balance.ybDebit - cw_Balance.ybCredit + cw_Balance.yDebit - cw_Balance.yCredit end as balc,
  122. case cw_Balance.ybrawDebit - cw_Balance.ybrawCredit + cw_Balance.yrawDebit - cw_Balance.yrawCredit when 0 then null else cw_Balance.ybrawDebit - cw_Balance.ybrawCredit + cw_Balance.yrawDebit - cw_Balance.yrawCredit end as rawbalc,
  123. 3 as dw_sort,
  124. 0 as fuluno,
  125. 0 as credid
  126. FROM cw_Balance
  127. WHERE ( cw_Balance.accsetid = :arg_accsetid ) AND
  128. (cw_Balance.subaccsetid = :arg_subaccsetid ) AND
  129. cw_Balance.SubID = :arg_subid AND
  130. cw_Balance.YearMon >= :arg_firstmon and
  131. cw_Balance.YearMon <= :arg_endmon
  132. "
  133. arguments=(("arg_accsetid", number), ("arg_subaccsetid", number), ("arg_subid", string), ("arg_subid_len", number), ("arg_if_post", number), ("arg_firstmon", number), ("arg_endmon", number), ("arg_rel", number))
  134. sort="cmonth A, dw_sort A, credno A, creddate A"
  135. )
  136. text(name=creddate_t visible="1" band=header 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="2" border="2" x="9" y="360" height="56" width="320" text="凭证日期" )
  137. text(name=cmonth_t visible="1" band=header 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="2" border="2" x="338" y="360" height="56" width="238" text="期间" )
  138. text(name=credno_t visible="1" band=header 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="2" border="2" x="585" y="360" height="56" width="155" text="编号" )
  139. text(name=cw_credencemx_brief_t visible="1" band=header 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="2" border="2" x="750" y="360" height="56" width="923" text="摘要" )
  140. text(name=rate_t visible="1" band=header 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="2" border="2" x="1682" y="360" height="56" width="219" text="汇率" )
  141. text(name=t_1 visible="1" band=header 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="2" border="2" x="1911" y="360" height="56" width="393" text="原币借方" )
  142. text(name=debit_t visible="1" band=header 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="2" border="2" x="2313" y="360" height="56" width="375" text="本位币借方" )
  143. text(name=t_2 visible="1" band=header 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="2" border="2" x="2697" y="360" height="56" width="384" text="原币贷方" )
  144. text(name=t_3 visible="1" band=header 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="2" border="2" x="3090" y="360" height="56" width="361" text="本位币贷方" )
  145. text(name=t_4 visible="1" band=header 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="2" border="2" x="3461" y="360" height="56" width="105" text="" )
  146. text(name=t_5 visible="1" band=header 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="2" border="2" x="3575" y="360" height="56" width="389" text="原币余额" )
  147. text(name=t_6 visible="1" band=header 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="2" border="2" x="3973" y="360" height="56" width="379" text="本位币余额" )
  148. column(name=cw_credencemx_brief visible="1" tag="摘要" band=detail id=4 x="750" y="4" height="68" width="923" color="0" border="0" alignment="0" 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=40 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 )
  149. column(name=credno visible="1" band=detail id=3 x="585" y="4" height="68" width="155" 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="-9" font.pitch="2" font.weight="400" tabsequence=0 )
  150. column(name=cmonth visible="1" band=detail id=2 x="338" y="4" height="68" width="238" 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="-9" font.pitch="2" font.weight="400" tabsequence=0 )
  151. column(name=creddate visible="1" band=detail id=1 x="9" y="4" height="68" width="320" color="0" border="0" alignment="2" format="yyyy-mm-dd" 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="-9" font.pitch="2" font.weight="400" tabsequence=0 )
  152. column(name=rate visible="1" band=detail id=7 x="1682" y="4" height="68" width="219" color="0" border="0" alignment="1" format="#,###.##########" 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="-9" font.pitch="2" font.weight="400" tabsequence=0 )
  153. compute(name=compute_1 visible="1" band=detail 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" x="3461" y="4" height="68" width="105" format="[general]" expression="if( balc =0 or isnull(balc),'平',if( balc >0,'借','贷'))" alignment="2" border="0" crosstab.repeat=no )
  154. compute(name=balc2 visible="1" band=detail 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 if( balc2 =0,rgb(255,255,255),rgb(0,0,0))" x="3973" y="4" height="68" width="379" format="#,##0.00" expression="abs( balc )" alignment="1" border="0" crosstab.repeat=no )
  155. compute(name=rawbalc2 visible="1" band=detail 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 if( rawbalc2 =0,rgb(255,255,255),rgb(0,0,0))" x="3575" y="4" height="68" width="389" format="#,##0.00" expression="abs( rawbalc )" alignment="1" border="0" crosstab.repeat=no )
  156. column(name=credit visible="1" band=detail id=6 x="3090" y="4" height="68" width="361" color="0 if( credit =0,rgb(255,255,255),rgb(0,0,0))" border="0" alignment="1" format="#,##0.00" 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="2" background.color="16777215" font.charset="134" font.face="宋体" font.family="0" font.height="-9" font.pitch="2" font.weight="400" tabsequence=0 )
  157. column(name=rawcredit visible="1" band=detail id=9 x="2697" y="4" height="68" width="384" color="0 if( rawcredit =0,rgb(255,255,255),rgb(0,0,0))" border="0" alignment="1" format="#,##0.00" 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="-9" font.pitch="2" font.weight="400" tabsequence=0 )
  158. column(name=debit visible="1" band=detail id=5 x="2313" y="4" height="68" width="375" color="0 if( debit =0,rgb(255,255,255),rgb(0,0,0))" border="0" alignment="1" format="#,##0.00" 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="-9" font.pitch="2" font.weight="400" tabsequence=0 )
  159. column(name=rawdebit visible="1" band=detail id=8 x="1911" y="4" height="68" width="393" color="0 if( rawdebit =0,rgb(255,255,255),rgb(0,0,0))" border="0" alignment="1" format="#,##0.00" 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="-9" font.pitch="2" font.weight="400" tabsequence=0 )
  160. text(name=bar visible="1" band=foreground font.charset="0" font.face="Arial" font.family="2" font.height="-12" font.pitch="2" font.weight="400" background.mode="2" background.color="16777215" color="0" alignment="0" border="0" x="0" y="0" height="356" width="4398" text="" )
  161. text(name=title visible="1" band=foreground font.charset="134" font.face="黑体" font.family="0" font.height="-18" font.pitch="2" font.weight="700" background.mode="2" background.color="16777215" color="0" alignment="0" border="0" x="14" y="8" height="108" width="1819" text="明细分类帐" )
  162. compute(name=compute_2 visible="1" band=foreground 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" x="14" y="132" height="56" width="1701" format="[general]" expression="~"单位名称:~"+f_rst_Cropname()" alignment="0" border="0" crosstab.repeat=no )
  163. text(name=subname visible="1" band=foreground 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="0" border="0" x="14" y="200" height="56" width="3017" text="" )
  164. compute(name=compute_3 visible="1" band=foreground 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" x="14" y="268" height="56" width="3008" format="[general]" expression="'打印时间: '+string(today(),'yyyy-mm-dd hh:mm:ss')+ ' 第 ' + string(page()) + ' 页/ 共 '+string(pageCount())+' 页'" alignment="1" border="0" crosstab.repeat=no )
  165. text(name=month visible="1" band=foreground 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="0" border="0" x="1733" y="132" height="56" width="1298" text="" )
  166. htmltable(border="1" )
  167. htmlgen(clientComputedFields="1" clientEvents="1" clientFormatting="0" clientScriptable="0" clientValidation="1" generateJavaScript="1" netscapeLayers="0" netscapelayers="0" encodeSelfLinkArgs="1" )
  168. export.xml(headGroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
  169. import.xml()
  170. export.pdf(method=0 distill.customPostScript="0" xslfop.print="0" )