Creating a Report in Student Registration Using Crystal Reports Part 3
Submitted by janobe on Tuesday, January 14, 2014 - 17:22.
This is the continuation of my tutorial. This time I will show you how to put a Crystal Report in a Windows Form and retrieving the records from the database.
Let’s begin:
First, open the file of Student Registration in Visual Studio 2008. Add a new file which is a Windows Form. And hit add.
Now, add the Crystal Reports Viewer and Report Documents in the reports Form.
Go back to the Design Views and click the Form1. Add a Button named “Print all Student’s Records”.
Double click the button and do this following code for showing the reports.
This is the last part of my tutorial. You can download the source code and run it on your computer.
- Private Sub report_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- 'showing the reports
- reports.Show()
- 'getting the crystal report and placing it on the crystal report viewer using the report documents that represent as a studentInfo.rpt
- reports.CrystalReportViewer1.ReportSource = reports.studentInfo1
- End Sub
Add new comment
- 471 views