将数据绑定到IFieldObject [英] Binding data to an IFieldObject

查看:79
本文介绍了将数据绑定到IFieldObject的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个子报告,可以在主报告上显示6次。每次出现的数据都会略有不同。子报表使用未绑定的字符串和数字格式化。

我的第一个偏好是somethig like:
'设置子报表的数据源
rpt.Subreports(0)。 SetDataSource(dTarget)
rpt.Subreports(1).SetDataSource(dTarget)
rpt.Subreports(2).SetDataSource( dTarget)
rpt.Subreports(3).SetDataSource(dTarget)
等............

'将未绑定字段设置为数据字段(这是我在对象中找不到的假设属性)
rpt.Subreports(0).Fields(" UnboundString1")。DataField = dTarget .Salesman
等其他子报告的其他字段



如果我不能得到它,那么如何将未绑定的字段绑定到数据字段?我认为绑定我拥有的字段比将数据字段拖放到每个子报表并且必须格式化每个子报表更容易。

感谢您的帮助。
Rich

< hr size ="1"align ="left"width ="25%"> GRG

解决方案

Hi Rich G



I have a subreport that will apear on a main report 6 times.  The data in each occurance will be slightly different.  The subreport was formatted using unbound strings and numbers.

My first preference would be somethig like:
'Set the datasource for the subreports
rpt.Subreports(0).SetDataSource(dTarget)
rpt.Subreports(1).SetDataSource(dTarget)
rpt.Subreports(2).SetDataSource(dTarget)
rpt.Subreports(3).SetDataSource(dTarget)
etc...........

'Set the unboundfield to a data field (this is a hypothetical property which I cannot find in the object)
rpt.Subreports(0).Fields("UnboundString1").DataField=dTarget.Salesman
etc for the rest of the fields in the rest of the subreports


If I cannot get that, then how do I bind an unbound field to a data field?  I think it would be easier to bind the fields I have rather than draging a data field onto each subreport and having to format each one.

Thanks for the help.
Rich


GRG

解决方案

Hi Rich G



这篇关于将数据绑定到IFieldObject的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆