dw_4.modify('create compute(band=summary alignment="0" expression="~'合计:~'"border="0" color="33554432" x="' + dw_4.describe("部门_t.x") + '" y="32" height="76" width="' + dw_4.describe("部门_t.width") + '" format="[GENERAL]" html.valueishtml="0" name=compute_20 visible="1" font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="536870912" )')
ls_date1="2011-05-01"
ls_date2="2011-05-03"
我现在想把expression的值"合计",换成"2011-05-01至2011-05-03",其中这两个ls_date1,ls_date2是变化的,是两个变量,
请问我应该写在什么样子它才能正确显示呢?
谢谢。
------解决方案--------------------
单引号是半角的,上面写成全角了
ls_date1="2011-05-01"
ls_date2="2011-05-03"
dw_4.modify('create compute(band=summary alignment="0" expression="~'' + ls_date1 + '至' + ls_date2 + '~'"border="0" color="33554432" x="' + dw_4.describe("部门_t.x") + '" y="32" height="76" width="' + dw_4.describe("部门_t.width") + '" format="[GENERAL]" html.valueishtml="0" name=compute_20 visible="1" font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="536870912" )')
------解决方案--------------------
- C# code
ls_date1="2011-05-01" ls_date2="2011-05-03" dw_4.modify('create compute(band=summary alignment="0" expression="~'" + ls_date1 + "-" + ls_date2 + ":~'"border="0" color="33554432" x="' + dw_4.describe("部门_t.x") + '" y="32" height="76" width="' + dw_4.describe("部门_t.width") + '" format="[GENERAL]" html.valueishtml="0" name=compute_20 visible="1" font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="536870912" )')