yuanbin74 发表于 2015-1-4 13:42:00

用户自定义报表

可以提供Designer一些开发资料吗? 比如在Designer的DETAIL区域如何绑定TEXTBox控件呢?

iceman 发表于 2015-1-4 19:14:00

回复 1楼yuanbin74的帖子

问题我们已经查收,明天进一步处理。

yuanbin74 发表于 2015-1-5 10:44:00

designer.Report里面怎么没有SaveLayout这个方法呢?

iceman 发表于 2015-1-5 12:11:00

回复 1楼yuanbin74的帖子

需要先获取该控件通过 DataFeild 属性设置:

private void button1_Click(object sender, EventArgs e)
      {
            foreach (var item in reportDesigner.Selection)
            {
                if (item is GrapeCity.ActiveReports.SectionReportModel.TextBox)
                {
                  GrapeCity.ActiveReports.SectionReportModel.TextBox tx = item as GrapeCity.ActiveReports.SectionReportModel.TextBox;
                  tx.DataField = "订购日期";
                }

            }
      }

yuanbin74 发表于 2015-1-5 13:04:00

谢谢,我再问一个问题,通过点击按钮把TextBox绑定到了designer, 我手动绑定数据到TextBox里面,怎么绑定了?

yuanbin74 发表于 2015-1-5 14:05:00

获取他的当前区域怎么获取?

iceman 发表于 2015-1-5 16:10:00

回复 6楼yuanbin74的帖子

抱歉,我不理解当前的问题:
“通过点击按钮把TextBox绑定到了designer”,请解释下这个绑定动作。
“ 我手动绑定数据到TextBox里面”是希望通过代码设置 TextBox 的字段吗?
页: [1]
查看完整版本: 用户自定义报表