I have struggled with setting the text in a TextObject within a Crystal Report.
I am using Visual Studio .NET C# and am trying to set the text in a TextObject in a Crystal Report (created in CR8).
My syntax follows :
ReportDocument crystalRpt = ReportDocument()
crystalRpt.Load(path-here);
TextObject textObject;
textObject = crystalRpt.ReportDefinition.Sections[1].ReportObjects[0] as TextObject;
textObject.Text = "ONE THING AFTER ANOTHER";
The problem I seem to get with this is that I only get the first few characters of this string displayed in my TextObject (the first / only one in my second section - indexed 1). The number of characters I get shown seems to be dependent on the length of the string I put into the textObject through the Crystal Report Designer itself.
How can I ensure that I am able to fully set the 'Text' against a TextObject including carriage returns and the like.
Any help would be appreciated.
Is it due to the fact that I'm using Crystal Reports 8 ?
Thanks in advance
Steve
I am using Visual Studio .NET C# and am trying to set the text in a TextObject in a Crystal Report (created in CR8).
My syntax follows :
ReportDocument crystalRpt = ReportDocument()
crystalRpt.Load(path-here);
TextObject textObject;
textObject = crystalRpt.ReportDefinition.Sections[1].ReportObjects[0] as TextObject;
textObject.Text = "ONE THING AFTER ANOTHER";
The problem I seem to get with this is that I only get the first few characters of this string displayed in my TextObject (the first / only one in my second section - indexed 1). The number of characters I get shown seems to be dependent on the length of the string I put into the textObject through the Crystal Report Designer itself.
How can I ensure that I am able to fully set the 'Text' against a TextObject including carriage returns and the like.
Any help would be appreciated.
Is it due to the fact that I'm using Crystal Reports 8 ?
Thanks in advance
Steve