手动控制列的隐藏和显示?

sjshuang 2009-04-21 02:01:50
我有一个dw里放了个report
现在想手动控制report中某列的显示和隐藏
dw_print.object.report.dw_1.price.visible = true 这样写报错
...全文
98 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
softvery 2009-04-21
  • 打赏
  • 举报
回复
通过
1、dw_print.object.dw_1.object.price.visible=true 可以实现
2、还可以通过以下的形式

dwobject dwo
dwo=dw_print.object.dw_1
dwo.object.price.visible=true

3、如果数据窗是composite类型的,那么还可以通过如下的形式:
通过getchild获取这个report,然后再操作他.
DataWindowChild dwc_report
dw_print.GetChild("dw_1", dwc_report)
dwc_report.modify("price.visible='0'")

dwchildvariable A variable in which you want to store the reference to the child DataWindow or report. For the Web ActiveX the separate function GetChildObject must be called to get the reference variable to the child object.

blc2003 2009-04-21
  • 打赏
  • 举报
回复
datawindowchild child
dw_print.getchild("dw_1",child)
child.Modify("price.visible=1")
newease 2009-04-21
  • 打赏
  • 举报
回复
dw_print.object.report.dw_1.price.visible = true 这样写报错


我想你的report应该为dw_1吧,那么应该改为

dw_print.object.dw_1.object.price.visible=true
newease 2009-04-21
  • 打赏
  • 举报
回复
举例

dw_1.object.dw_2.object.cpjg_name.visible=false


dw_1为数据窗口

dw_2是数据窗口中的报表


请参考此方法修改
gdfg34324 2009-04-21
  • 打赏
  • 举报
回复
hide(dw_print.object.report.dw_1.price)

609

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder DataWindow
社区管理员
  • DataWindow社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧