Now that you've added the Reports for WinForms controls to the form and customized the form and controls, there's only one last step left before running the project. In this step you'll add code to the project to set the text that appears in the project.
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1PrintDocument1.Body.Children.Add(New C1.C1Preview.RenderText("Hello, World!")) |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1PrintDocument1.Body.Children.Add(new RenderText("Hello, World!")); |
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Me.C1PrintDocument1.Generate() |
To write code in C#
C# |
Copy Code
|
---|---|
this.c1PrintDocument1.Generate(); |
You've added code to the project and completed step 3 of the printing and previewing quick start guide. In the last step you'll run the program.