rabbit75
Programmer
- Aug 15, 2002
- 30
I have a report in CR10 which has a text object which changes, using this code:
The problem is that the text should be centered, and it is fine if I don't change the text, but if I change the text, it left aligns.
I tried adding this line, but it still left aligns:
Has anyone else encountered this?
Thanks,
rabbit75
Code:
Dim tmp As CrystalDecisions.CrystalReports.Engine.TextObject
tmp = _
myRpt.ReportDefinition.Sections("TSection4").ReportObjects.Item("Text1")
tmp.Text = myValue
The problem is that the text should be centered, and it is fine if I don't change the text, but if I change the text, it left aligns.
I tried adding this line, but it still left aligns:
Code:
tmp.ObjectFormat.HorizontalAlignment = Alignment.HorizontalCenterAlign
Thanks,
rabbit75