In C#, how do I load custom values into Crystal Reports?
Posted on 2008-10-12
I am very new to C# and Crystal Reports. I would like to display data in a Crystal Reports report that is the result of a SQL query. Additionally, I may have to massage some data before it is displayed (i.e. one field is an operation number, I want to add "Operation" to it. Also add a line to the end of each row were initials will be added by hand later).
I am using the ReportPreview and the version of CR included with Visual Studio.
I understand how to add a static value:
TextObject preOrderNumb = TravelerReport.ReportDefinition.ReportObjects["txtOrderNumb"] as TextObject;
preOrderNumb.Text = "MyText";
But I'm not sure how do add the objects dynamically and assign my sql query values. I have also investigated creating a custom dataset but have not had much success.
Thank you, in advance.