User1429399154 posted
good night friends
programmers if I can orient please
I'm trying to show a report in crystal report with vb.net 2010 the problem arises when I try to generate the report
create a data set is called dsregistro
this dataset the link to a report
It called rpregistro.rp
My form is called generar_reporte
first mistake I remove all lines of code and mark me this error

two error when I put the code
Private Sub Generar_Reporte_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Dim crystalReport As New rpregistro()
Dim dataset As dsregistro = GetData()
crystalReport.SetDataSource(dataset)
Me.CrystalReportViewer1.ReportSource = crystalReport
Me.CrystalReportViewer1.RefreshReport()
End Sub
Private Function GetData() As dsregistro
Dim connectionstring As String = "Data Source=localhost;Database=estacionamiento;Uid=root;Password=123456"
Using conn As MySqlConnection = New MySqlConnection(connectionstring)
Using cmd As New MySqlCommand("SELECT * FROM registro")
Using sda As New MySqlDataAdapter()
cmd.Connection = conn
sda.SelectCommand = cmd
Using dataset As New dsregistro()
sda.Fill(dataset, "registro")
Return dataset
End Using
End Using
End Using
End Using
End Function
End Class
this is the dataset (dsregistro) that binds to the report called rpregistro.rpt
