This is the continuation of my tutorial about Generating Reports. This time I will show you how to put a Crystal Report in a Windows Form and retrieving the records from the database.
First, open the file of Employee’s Information in Visual Studio 2008. Add a new Windows Form Application. And hit add.
After that, 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, name it “Print”.
Double click the button and do this following code for showing the reports.
Private Sub report_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
‘showing the reports
‘getting the crystal report and placing it on the crystal report viewer using the report documents that represent as a EmpInfo.rpt
frmreports.CrystalReportViewer1.ReportSource = reports.EmpInfo.rpt
1 thought on “17-Generating Reports (part 3)”
Hi,im completely new to desktop application development using vb.net 2012. i wrote a windows for application that is connected to mysql database and its server xampp. i try to deploy the programe, but it can only work if the user has xampp insatlled and runing. please i need help. thank you