更改线对象的位置 [英] Changing the location of a Line Object

查看:57
本文介绍了更改线对象的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要创建动态Rp并更改垂直线的位置。但是当我改变位置LEFT时,出现错误(线对象的坐标无效。仅支持垂直或水平线)。示例(代码C#):LineObject Ln =(LineObject)rpt.Session2.ReportObjects [" Line1" ]。 Ln.Left = 10;请帮帮我。谢谢!


论坛:Visual Studio的Crystal Reports
发布时间:2006年9月22日星期五上午9:04帖子主题:: Line Object

I want Create a Dynamic Rp and Change location of vertical line. But  there is error occur ( The line object's coordinates are not valid. Only vertical or horizontal lines are supported ) when I change location LEFT .Example (Code C#):                  LineObject  Ln=(LineObject) rpt.Session2.ReportObjects["Line1"];                Ln.Left=10;Please help me. Thanks!


Forum: Crystal Reports for Visual Studio
Posted: : Friday, September 22, 2006 9:04 AM
Post Subject: : Line Object

customization写道:

我尝试使用vb.net在crystal report中设置线对象的LEFT属性。例如

 customization wrote:

I try to set the LEFT property of a line object in crystal report using vb.net. For e.g.

Report.Section2.ReportObjects(" Line1")。Left = 100

但是,出现如下错误信息:

错误号是 - 2147213284 ,错误说明是 线对象的坐标无效。只支持垂直或水平线。

那么有什么方法可以解决上述问题吗?

推荐答案

试试这个

ReportDocument reportDocument = new crystalReport(); // crystalReport是我的rpt文件

ReportObject reportObject = reportDocument.ReportDefinition.ReportObjects [" Line1"]; // Line1是crystalreport文档中的LineObject

LineObject lineObject =(LineObject)reportObject;
lineObject.Top = 500;
lineObject.Left = 200;
try this

ReportDocument reportDocument = new crystalReport(); // crystalReport is my rpt file
                       
ReportObject reportObject = reportDocument.ReportDefinition.ReportObjects["Line1"]; // Line1 is LineObject in crystalreport document

LineObject lineObject = (LineObject)reportObject;
lineObject.Top = 500;
lineObject.Left = 200;


这篇关于更改线对象的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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