Crystal Report: Set the position of a line in runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, didn't expect that i would encounter problems while doing this but ...
Well, I'm working on a project which reports with different layout and fields
are generated with one generic template. I have no problem with setting the
width and position of the fields (and suppressing unused ones). What I would
like to add to the report are vertical lines to separate the fields. I've put
some vertical lines in arbitary position in the template. However, in the
code, when I try to set the position of the object, it returns me an
exception saying:

<Additional information: The line object's coordinates are not valid. Only
vertical or horizontal lines are supported.>

Here's the code that generates the error

ReportObject testLineObject =
reportDoc.ReportDefinition.ReportObjects["Line4"];
testLineObject.Left = 100;

Please help ~~~ Thanks in advance!!
 
Back
Top