DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

change the text of a report comment programmatically

Solved!
Go to solution

I'm learning the new 2012 Diadem object oriented reporting.

I am trying to change the text of a report comment programmatically.

Dim MyComment
Set MyComment = Report.ActiveSheet.Objects.Add(eReportObjectComment,"MyComment")
MyComment.Position.ByBorder.top=30
MyComment.Position.ByBorder.bottom=20
MyComment.Position.ByBorder.Left=20
MyComment.Position.ByBorder.right=30
MyComment.Text="Some text"

Error msg on the last line of the previous code = "Object doesn't support this
property or method: 'Text'"

I can change it manually by dbl-clicking the comment, but want to change it in
the script.

'Text' is offered as a valid option while typing the script. The 'text' object
works fine if I'm modifying a eReportObjectText but not a eReportObjectComment.

Thanks,
James

0 Kudos
Message 1 of 3
(5,366 Views)
Solution
Accepted by topic author JDeckert

Hello James,

 

please check it with modified last code line:

MyComment.Comment.Text="Some text"

Dia791

0 Kudos
Message 2 of 3
(5,362 Views)

Thanks Dia791, that did work.

 

James

0 Kudos
Message 3 of 3
(5,357 Views)