1 | initial version |
To create a crystal report from a dataset in VB.NET, follow the steps below:
In the form's Load event, add the following code:
Dim report As New CrystalReport1() 'Replace CrystalReport1 with the name of your report report.SetDataSource(dataset1) 'Replace dataset1 with the name of your dataset CrystalReportViewer1.ReportSource = report
Run the application to display the report in the Crystal Report Viewer control.
Note: You may need to configure the Crystal Report Viewer control to connect to your database if your dataset is based on a database.