⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 d_test.srd

📁 dw中SUM函数的使用
💻 SRD
📖 第 1 页 / 共 2 页
字号:
$PBExportHeader$d_test.srd
release 7;
datawindow(units=0 timer_interval=0 color=16777215 processing=0 HTMLDW=no print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no )
header(height=444 color="536870912" )
summary(height=76 color="536870912" )
footer(height=0 color="536870912" )
detail(height=0 color="536870912" )
table(column=(type=char(10) updatewhereclause=no name=tran_name dbname="tran_name" )
 column=(type=char(10) updatewhereclause=no name=city_group dbname="city_group" )
 column=(type=char(10) updatewhereclause=no name=city_name dbname="city_name" )
 column=(type=number updatewhereclause=no name=city_num dbname="city_num" )
 column=(type=char(10) updatewhereclause=no name=tran_type dbname="tran_type" )
 )
data("大巴", "四川", "成都", 2, "公路", "大巴", "四川", "成都", 3, "公路", "大巴", "四川", "乐山", 34, "公路", "大巴", "四川", "乐山", 567, "公路", "大巴", "四川", "自贡", 88, "公路", "大巴", "四川", "自贡", 99, "公路", "大巴", "云南", "昆明", 45, "公路", "大巴", "云南", "昆明", 34, "公路", "大巴", "云南", "大理", 213, "公路", "大巴", "云南", "大理", 5, "公路", "大巴", "云南", "西双版纳", 6, "公路", "大巴", "云南", "西双版纳", 456, "公路", "中巴", "四川", "成都", 23, "公路", "中巴", "四川", "成都", 123, "公路", "中巴", "四川", "乐山", 6, "公路", "中巴", "四川", "乐山", 677, "公路", "中巴", "四川", "自贡", 88, "公路", "中巴", "四川", "自贡", 345, "公路", "中巴", "云南", "昆明", 23, "公路", "中巴", "云南", "昆明", 54, "公路", "中巴", "云南", "大理", 546, "公路", "中巴", "云南", "大理", 657, "公路", "中巴", "云南", "西双版纳", 234, "公路", "中巴", "云南", "西双版纳", 123, "公路", "小车", "四川", "成都", 324, "公路", "小车", "四川", "成都", 65, "公路", "小车", "四川", "乐山", 7, "公路", "小车", "四川", "乐山", 345, "公路", "小车", "四川", "自贡", 123, "公路", "小车", "四川", "自贡", 44, "公路", "小车", "云南", "昆明", 55, "公路", "小车", "云南", "昆明", 634, "公路", "小车", "云南", "大理", 2134, "公路", "小车", "云南", "大理", 654, "公路", "小车", "云南", "西双版纳", 234, "公路", "轿车", "云南", "西双版纳", 23, "公路", "铁路", "四川", "成都", 33, "铁路", "铁路", "四川", "成都", 12, "铁路", "铁路", "四川", "乐山", 44, "铁路", "铁路", "四川", "乐山", 44, "铁路", "铁路", "四川", "自贡", 55, "铁路", "铁路", "四川", "自贡", 123, "铁路", "铁路", "云南", "昆明", 3432, "铁路", "铁路", "云南", "昆明", 67, "铁路", "铁路", "云南", "大理", 78, "铁路", "铁路", "云南", "大理", 24, "铁路", "铁路", "云南", "西双版纳", 54, "铁路", "铁路", "云南", "西双版纳", 90, "铁路", "航空", "四川", "成都", 345, "航空", "航空", "四川", "成都", 12, "航空", "航空", "四川", "乐山", 34, "航空", "航空", "四川", "乐山", 3454, "航空", "航空", "四川", "自贡", 56, "航空", "航空", "四川", "自贡", 6, "航空", "航空", "云南", "昆明", 23, "航空", "航空", "云南", "昆明", 21, "航空", "航空", "云南", "大理", 34, "航空", "航空", "云南", "大理", 6, "航空", "航空", "云南", "西双版纳", 77, "航空", "航空", "云南", "西双版纳", 45, "航空", ) 
group(level=1 header.height=0 trailer.height=72 by=("tran_type" ) header.color="536870912" trailer.color="536870912" )
group(level=2 header.height=80 trailer.height=0 by=("tran_name" ) header.color="536870912" trailer.color="536870912" )
text(band=background alignment="2" text="~tcase ( max_type 
when 1 then '公路' 
when 2 then '公~~r路'
when 3 then '公路~~r~~r' 
when 4 then '~~r公路~~r' 
else fill('~~r',ceiling((max(type_count) -2) /2)) + '公~~r路'+fill('~~r',ceiling((max(type_count) -2) /2))
)" border="0" color="0" x="82" y="512" height="180~tmax(type_count) * 72" width="69"  name=t_14  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="553648127" )
text(band=header alignment="2" text="类别" border="0" color="0" x="91" y="364" height="56" width="110"  name=t_10  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="四川" border="0" color="0" x="1125" y="280" height="56" width="224"  name=t_7  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="云南" border="0" color="0" x="1902" y="276" height="56" width="224"  name=t_8  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="西南地区客运能力统计表" border="0" color="0" x="27" y="84" height="124" width="2386"  name=t_11  font.face="宋体" font.height="-20" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="合计" border="0" color="0" x="622" y="328" height="56" width="224"  name=t_9  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="成都" border="0" color="0" x="878" y="368" height="56" width="224"  name=t_1  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="乐山" border="0" color="0" x="1134" y="368" height="56" width="224"  name=t_2  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="自贡" border="0" color="0" x="1390" y="368" height="56" width="224"  name=t_3  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="昆明" border="0" color="0" x="1646" y="368" height="56" width="224"  name=t_4  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="大理" border="0" color="0" x="1902" y="368" height="56" width="224"  name=t_5  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="西双版纳" border="0" color="0" x="2158" y="368" height="56" width="224"  name=t_6  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
line(band=header x1="864" y1="348" x2="2400" y2="348"  name=l_4 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
line(band=header x1="37" y1="264" x2="599" y2="436"  name=l_16 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
text(band=header alignment="2" text="地区" border="0" color="0" x="430" y="292" height="56" width="110"  name=t_12  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
line(band=header x1="37" y1="264" x2="2400" y2="264"  name=l_1 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
line(band=header x1="37" y1="440" x2="2395" y2="440"  name=l_2 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
compute(band=header alignment="0" expression="count (tran_name for group 1 DISTINCT)"border="0" color="16711680" x="1915" y="8" height="56" width="215" format="[GENERAL]"  name=compute_22 visible="1~t0"  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
compute(band=header alignment="0" expression="count (tran_name for group 1 DISTINCT)"border="0" color="16711680" x="2185" y="12" height="56" width="215" format="[GENERAL]"  name=type_count visible="1~t0"  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )
compute(band=header alignment="0" expression="max(type_count)"border="0" color="0" x="1614" y="12" height="76" width="256" format="[GENERAL]"  name=max_type visible="1~t0"  font.face="Arial" font.height="-12" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
compute(band=header.2 alignment="0" expression=" compute_7  +  compute_8  +  compute_9  +  compute_10  +  compute_11  +  compute_12 "border="0" color="0" x="622" y="8" height="56" width="224" format="[GENERAL]"  name=compute_13 visible="1~tif (compute_22  > 1,1,0)"  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="2" background.color="16777215" )
compute(band=header.2 alignment="1" expression="sum(if (city_name=~"成都~",city_num,0) for group 2)"border="0" color="0" x="878" y="8" height="56" width="224" format="[GENERAL]"  name=compute_7 visible="1~tif (compute_22  > 1,1,0)"  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="2" background.color="16777215" )
compute(band=header.2 alignment="1" expression="sum(if (city_name=~"乐山~",city_num,0) for group 2 )"border="0" color="0" x="1134" y="8" height="56" width="224" format="[GENERAL]"  name=compute_8 visible="1~tif (compute_22  > 1,1,0)"  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="2" background.color="16777215" )
compute(band=header.2 alignment="1" expression="sum(if (city_name=~"自贡~",city_num,0) for group 2)"border="0" color="0" x="1390" y="8" height="56" width="224" format="[GENERAL]"  name=compute_9 visible="1~tif (compute_22  > 1,1,0)"  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="2" background.color="16777215" )
compute(band=header.2 alignment="1" expression="sum(if (city_name=~"昆明~",city_num,0) for group 2)"border="0" color="0" x="1646" y="8" height="56" width="224" format="[GENERAL]"  name=compute_10 visible="1~tif (compute_22  > 1,1,0)"  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="2" background.color="16777215" )
compute(band=header.2 alignment="1" expression="sum(if (city_name=~"大理~",city_num,0) for group 2)"border="0" color="0" x="1902" y="8" height="56" width="224" format="[GENERAL]"  name=compute_11 visible="1~tif (compute_22  > 1,1,0)"  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="2" background.color="16777215" )
compute(band=header.2 alignment="1" expression="sum(if (city_name=~"西双版纳~",city_num,0) for group 2)"border="0" color="0" x="2158" y="8" height="56" width="224" format="[GENERAL]"  name=compute_12 visible="1~tif (compute_22  > 1,1,0)"  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="2" background.color="16777215" )
line(band=header.2 x1="37" y1="0" x2="37" y2="92"  name=l_18 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
line(band=header.2 x1="603" y1="72" x2="2400" y2="72"  name=l_6 visible="1~tif (compute_22  > 1,1,0)" pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
line(band=header.2 x1="603" y1="0" x2="603" y2="92"  name=l_20 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
line(band=header.2 x1="859" y1="0" x2="859" y2="92"  name=l_29 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
line(band=header.2 x1="1115" y1="0" x2="1115" y2="92"  name=l_30 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
line(band=header.2 x1="1371" y1="0" x2="1371" y2="92"  name=l_31 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
line(band=header.2 x1="1627" y1="0" x2="1627" y2="92"  name=l_32 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
line(band=header.2 x1="1883" y1="0" x2="1883" y2="92"  name=l_33 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
line(band=header.2 x1="2139" y1="0" x2="2139" y2="92"  name=l_34 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
line(band=header.2 x1="2395" y1="0" x2="2395" y2="92"  name=l_35 pen.style="0" pen.width="5~t0.5" pen.color="8421504"  background.mode="2" background.color="16777215" )
line(band=header.2 x1="197" y1="72" x2="603" y2="72"  name=l_52 visible="1~tif (compute_22  > 1,1,0)" pen.style="0" pen.width="5" pen.color="8421504"  background.mode="2" background.color="16777215" )
compute(band=header.2 alignment="0" expression="if (compute_22 = 1,'',tran_name)"border="0" color="16711680" x="306" y="8" height="56" width="215" format="[GENERAL]"  name=compute_23  font.face="宋体" font.height="-9" font.weight="400"  font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" )

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -