dw_rp_subid_mx.srd 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. $PBExportHeader$dw_rp_subid_mx.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=2 print.margin.left=110 print.margin.right=110 print.margin.top=96 print.margin.bottom=96 print.paper.size=9 print.paper.source=0 print.canusedefaultprinter=yes grid.lines=0 selected.mouse=yes)
  5. header(height=448 color="536870912" )
  6. summary(height=0 color="536870912" )
  7. footer(height=0 color="536870912" )
  8. detail(height=84 color="553648127" height.autosize=yes)
  9. table(column=(type=datetime updatewhereclause=yes name=cw_credence_creddate dbname="cw_subject.creddate" )
  10. column=(type=long updatewhereclause=yes name=cmonth dbname="cw_Balance.cmonth" )
  11. column=(type=char(10) updatewhereclause=yes name=credtype dbname="credtype" )
  12. column=(type=long updatewhereclause=yes name=credno dbname="credno" )
  13. column=(type=char(255) updatewhereclause=yes name=cw_credencemx_brief dbname="brief" )
  14. column=(type=decimal(2) updatewhereclause=yes name=debit dbname="cw_subject.Debit" )
  15. column=(type=decimal(2) updatewhereclause=yes name=credit dbname="cw_subject.Credit" )
  16. column=(type=decimal(2) updatewhereclause=yes name=balc dbname="balc" )
  17. column=(type=long updatewhereclause=yes name=dw_sort dbname="dw_sort" )
  18. column=(type=long updatewhereclause=yes name=fuluno dbname="fuluno" )
  19. column=(type=long updatewhereclause=yes name=credid dbname="credid" )
  20. column=(type=char(255) updatewhereclause=yes name=mxdscrp dbname="mxdscrp" )
  21. retrieve=" SELECT null as creddate,
  22. cw_Balance.YearMon as cmonth,
  23. '' as credtype,
  24. 0 as credno,
  25. '期初余额' as brief,
  26. null as Debit,
  27. null as Credit,
  28. 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,
  29. 0 as dw_sort,
  30. 0 as fuluno,
  31. 0 as credid,
  32. '' as mxdscrp
  33. FROM cw_subject left outer join cw_Balance on
  34. cw_subject.accsetid = cw_Balance.accsetid and
  35. cw_subject.SubID = cw_Balance.SubID
  36. WHERE ( cw_subject.accsetid = :arg_accsetid ) AND
  37. ( cw_subject.SubID = :arg_subid ) AND
  38. ( cw_Balance.YearMon >= :arg_firstmon or cw_Balance.YearMon is null ) AND
  39. ( cw_Balance.YearMon <= :arg_endmon or cw_Balance.YearMon is null )
  40. union all
  41. SELECT cw_credence.creddate as creddate,
  42. cw_credence.cmonth as cmonth,
  43. cw_credence.credtype as credtype,
  44. cw_credence.credno as credno,
  45. case :arg_rel when 1 then
  46. ltrim(rtrim(cw_credencemx.brief)) + ' ' +
  47. case len(ltrim(rtrim(cw_credence.reldcode))) when 0 then '' else '相关号:'+ltrim(rtrim(cw_credence.reldcode)) end + ' '+
  48. case reldate when null then '' else '相关日期:'+ convert(char(4),year(reldate))+'-'+convert(char(2),month(reldate))+'-'+ convert(char(2),day(reldate)) end
  49. else
  50. ltrim(rtrim(cw_credencemx.brief)) + ' ' +
  51. case len(ltrim(rtrim(cw_credence.reldcode))) when 0 then '' else '相关号:'+ltrim(rtrim(cw_credence.reldcode)) + ' '+
  52. case reldate when null then '' else '相关日期:'+ convert(char(4),year(reldate))+'-'+convert(char(2),month(reldate))+'-'+ convert(char(2),day(reldate)) end end end
  53. + case when cw_credencemx.deptid = 0 then '' else '(部门:'+rtrim(cw_department.departmentname)+')' end +
  54. case when cw_credencemx.itemid = 0 then '' else '(项目:'+rtrim(cw_hsitem.hsitemname)+')' end +
  55. case when cw_credencemx.cusid = 0 then '' else '(客户:'+rtrim(u_cust.name)+')' end +
  56. case when cw_credencemx.sptid = 0 then '' else '(供应商:'+rtrim(u_spt.name)+')'end as brief,
  57. case cw_credencemx.debit when 0 then null else cw_credencemx.debit end as debit,
  58. case cw_credencemx.credit when 0 then null else cw_credencemx.credit end as credit ,
  59. 0.00 as balc,
  60. 1 as dw_sort,
  61. cw_credencemx.fuluno as fuluno ,
  62. cw_credence.credid as credid,
  63. cw_credencemx.mxdscrp as mxdscrp
  64. FROM cw_credence,
  65. cw_credencemx
  66. left outer join cw_department on cw_credencemx.deptid = cw_department.departmentid
  67. left outer join cw_hsitem on cw_credencemx.itemid = cw_hsitem.hsitemid
  68. left outer join u_cust on cw_credencemx.cusid = u_cust.cusid
  69. left outer join u_spt on cw_credencemx.sptid = u_spt.sptid
  70. WHERE ( cw_credence.accsetid = cw_credencemx.accsetid ) and
  71. ( cw_credence.subaccsetid = cw_credencemx.subaccsetid ) and
  72. ( cw_credence.credid = cw_credencemx.credid ) and
  73. ( ( cw_credence.accsetid = :arg_accsetid ) AND
  74. ( cw_credence.subaccsetid = :arg_subaccsetid or :arg_subaccsetid = -1 ) AND
  75. ( cw_credence.cmonth >= :arg_firstmon ) AND
  76. ( cw_credence.cmonth <= :arg_endmon ) AND
  77. ( cw_credence.postflag = :arg_if_post or :arg_if_post = -1 ) AND
  78. ( left(cw_credencemx.subid,:arg_subid_len) = :arg_subid ) )
  79. union all
  80. SELECT null as creddate,
  81. cw_credence.cmonth as cmonth,
  82. '' as credtype,
  83. 0 as credno,
  84. '本期合计' as brief,
  85. case sum(cw_credencemx.debit) when 0 then null else sum(cw_credencemx.debit) end as debit,
  86. case sum(cw_credencemx.Credit) when 0 then null else sum(cw_credencemx.Credit) end as Credit,
  87. 0.00 as balc,
  88. 2 as dw_sort,
  89. 0 as fuluno,
  90. 0 as credid,
  91. '' as mxdscrp
  92. FROM cw_credence,
  93. cw_credencemx
  94. WHERE ( cw_credence.accsetid = cw_credencemx.accsetid ) and
  95. ( cw_credence.subaccsetid = cw_credencemx.subaccsetid ) and
  96. ( cw_credence.credid = cw_credencemx.credid ) and
  97. ( ( cw_credence.accsetid = :arg_accsetid ) AND
  98. ( cw_credence.subaccsetid = :arg_subaccsetid or :arg_subaccsetid = -1 ) AND
  99. ( cw_credence.cmonth >= :arg_firstmon ) AND
  100. ( cw_credence.cmonth <= :arg_endmon ) AND
  101. ( cw_credence.postflag = :arg_if_post or :arg_if_post = -1 ) AND
  102. ( left(cw_credencemx.subid,:arg_subid_len) = :arg_subid ) )
  103. group by cw_credence.cmonth
  104. union all
  105. SELECT null as creddate,
  106. cw_Balance.YearMon as cmonth,
  107. '' as credtype,
  108. 0 as credno,
  109. '本年累计' as brief,
  110. case cw_Balance.yDebit when 0 then null else cw_Balance.yDebit end as debit,
  111. case cw_Balance.yCredit when 0 then null else cw_Balance.yCredit end as Credit,
  112. 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,
  113. 3 as dw_sort,
  114. 0 as fuluno,
  115. 0 as credid,
  116. '' as mxdscrp
  117. FROM cw_Balance
  118. WHERE ( cw_Balance.accsetid = :arg_accsetid ) AND
  119. (cw_Balance.subaccsetid = :arg_subaccsetid ) AND
  120. cw_Balance.SubID = :arg_subid AND
  121. cw_Balance.YearMon >= :arg_firstmon and
  122. cw_Balance.YearMon <= :arg_endmon"
  123. 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))
  124. sort="cmonth A, dw_sort A, credno A, cw_credence_creddate A"
  125. )
  126. text(name=cw_credence_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="392" height="56" width="325" text="凭证日期" )
  127. 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="343" y="392" height="56" width="197" text="期间" )
  128. text(name=credtype_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="549" y="392" height="56" width="114" text="字" )
  129. 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="672" y="392" height="56" width="96" text="号" )
  130. 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="777" y="392" height="56" width="901" text="摘要" )
  131. 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="1687" y="392" height="56" width="489" text="借方" )
  132. text(name=credit_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="2185" y="392" height="56" width="489" text="贷方" )
  133. 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="0" border="2" x="2683" y="392" height="56" width="82" text="" )
  134. 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="2775" y="392" height="56" width="489" text="余额" )
  135. 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="3273" y="392" height="56" width="617" text="补充备注" )
  136. column(name=cw_credence_creddate visible="1" tag="日期" band=detail id=1 x="9" y="8" height="72" width="325" color="0" border="0" alignment="2" format="yyyy-mm-dd" 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=yes 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 )
  137. column(name=cmonth visible="1" band=detail id=2 x="343" y="8" height="72" width="197" 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 )
  138. column(name=credno visible="1" band=detail id=4 x="672" y="8" height="72" width="96" color="0" border="0" alignment="2" 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="-10" font.pitch="2" font.weight="400" tabsequence=0 )
  139. column(name=cw_credencemx_brief visible="1" tag="摘要" height.autosize=yes band=detail id=5 x="777" y="8" height="72" width="901" 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 )
  140. column(name=debit visible="1" band=detail id=6 x="1687" y="8" height="72" width="489" color="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="-10" font.pitch="2" font.weight="400" tabsequence=0 )
  141. column(name=credit visible="1" band=detail id=7 x="2185" y="8" height="72" width="489" color="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="-10" font.pitch="2" font.weight="400" tabsequence=0 )
  142. compute(name=obj_5661891 visible="1" 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="2683" y="8" height="72" width="82" format="[general]" expression="if( balc =0 or isnull(balc),'平',if( balc >0,'借','贷'))" alignment="2" border="0" crosstab.repeat=no )
  143. column(name=credtype visible="1" band=detail id=3 x="549" y="8" height="72" width="114" 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 )
  144. compute(name=balc2 visible="1" band=detail 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" x="2775" y="8" height="72" width="489" format="#,##0.00" expression="abs( balc )" alignment="1" border="0" crosstab.repeat=no )
  145. column(name=mxdscrp visible="1" height.autosize=yes band=detail id=12 x="3273" y="8" height="72" width="617" color="0" border="0" alignment="0" 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 )
  146. 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="388" width="3337" text="" )
  147. compute(name=compute_1 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="156" height="56" width="1861" format="[general]" expression="~"单位名称:~"+f_rst_Cropname()" alignment="0" border="0" crosstab.repeat=no )
  148. 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="1893" y="156" height="56" width="983" text="" )
  149. text(name=t_4 visible="1" moveable=1 resizeable=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="2889" y="156" height="56" width="430" text="币别:人民币" )
  150. text(name=title 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="0" y="8" height="132" width="3323" text="明细帐" )
  151. 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="224" height="56" width="3310" text="" )
  152. 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="296" height="56" width="3305" format="[general]" expression="'打印时间:'+string(today(),'yyyy-mm-dd hh:mm')+ ' 第 ' + string(page()) + ' 页/ 共 '+string(pageCount())+' 页'" alignment="0" border="0" crosstab.repeat=no )
  153. htmltable(border="1" )
  154. htmlgen(clientComputedFields="1" clientEvents="1" clientFormatting="0" clientScriptable="0" clientValidation="1" generateJavaScript="1" netscapeLayers="0" netscapelayers="0" encodeSelfLinkArgs="1" )
  155. export.xml(headGroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
  156. import.xml()
  157. export.pdf(method=0 distill.customPostScript="0" xslfop.print="0" )