problem with crystal report dataset with dataset RRS feed

  • Question

  • 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()
            Me.CrystalReportViewer1.ReportSource = crystalReport
        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

    Sunday, March 20, 2016 1:27 AM


  • User1429399154 posted

    thank you very much friends Forum
    the solution thus
    in app.cong
    add these lines

    <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
        <supportedRuntime version="v2.0.50727"></supportedRuntime>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, March 22, 2016 12:04 PM