Click here to Skip to main content
15,902,939 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
VB
strNAme = ds.Tables("report").Rows(i).Item("LabelName")

 Dim Line As LineObject = DirectCast(rpt.ReportDefinition.ReportObjects(strNAme), LineObject)
   Line.Left = ds.Tables("report").Rows(i).Item("Align_Left")' ERROR IS HERE
 Line.Top = ds.Tables("report").Rows(i).Item("Align_Top")
  Line.Right = ds.Tables("report").Rows(i).Item("Align_Right")
   Line.Bottom = ds.Tables("report").Rows(i).Item("Align_Bottom")


i am getting error on
Line.Left

System.Runtime.InteropServices.COMException was caught
ErrorCode=-2147213284
Message="The line object's coordinates are not valid. Only vertical or horizontal lines are supported."
Posted

Here one solved thread
http://scn.sap.com/thread/1505558[^]
 
Share this answer
 
Comments
Omkaara 15-Nov-13 1:15am    
that does not solve my problem
thatraja 15-Nov-13 1:48am    
more details?
Omkaara 15-Nov-13 3:07am    
i have many horizontal lines & vertical lines in my crystal i stored their location in db and change from vb.net as & when required
i wanted to move any any of these line at a time at particular location which will be stored in db
agent_kruger 4-Apr-14 9:23am    
yes sir, it didn't solve the problem.
C#
if (Hline)
{
    //Hline. set left and right = left you want
    lineObj.Left = Twip.PixelToTwipX(this.X1);
    lineObj.Right = lineObj.Left;
    //set top and bottom = top you want
    lineObj.Top = Twip.PixelToTwipY(this.Y1);
    lineObj.Bottom = lineObj.Top;
    //set right
    lineObj.Right = Twip.PixelToTwipX(this.X2);
}
else
{
    //My language
    //đường dọc. cho top và bottom bằng top mong muốn
    lineObj.Top = Twip.PixelToTwipY(this.Y1);
    lineObj.Bottom = lineObj.Top;
    //Đổi left = right = left mong muốn
    lineObj.Left = Twip.PixelToTwipX(this.X1);
    lineObj.Right = lineObj.Left;
    //Đổi bottom
    lineObj.Bottom = Twip.PixelToTwipX(this.Y2);
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900