problem creating new reportdatasource RRS feed

  • Question

  • User-89493104 posted

    Hello, I'm using visual studio 2010, I'm creating a report with 2 parameters.

    But when i want to create my new reportdatasource, it goes wrong

    here's is my code  :


     Private Sub ReportViewer1_Load_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RPV_fouten.Load
            Dim ds As New DataSet

            Dim adapfouten As ds_laatste_foutenTableAdapters.View_overzicht_foutenTableAdapter = New ds_laatste_foutenTableAdapters.View_overzicht_foutenTableAdapter
            Dim fouten As ds_laatste_fouten.View_overzicht_foutenDataTable = New ds_laatste_fouten.View_overzicht_foutenDataTable

            adapfouten.Fillmet2id(fouten, CInt(txtbox_vanid.Text), CInt(txtbox_totid.Text))

            Dim datasource As New ReportDataSource("fouten", fouten)


        End Sub


    The error goes on the line that is bold and underscored : i get followwing error :

    Overload resolution failed because no accessible 'New' is most specific for these arguments:
        'Public Sub New(name As String, dataSourceValue As System.Collections.IEnumerable)': Not most specific.
        'Public Sub New(name As String, dataSourceValue As System.Data.DataTable)': Not most specific.

    Already searched for 2 days..... who can help me please....

    Tuesday, August 30, 2011 4:07 AM

All replies

  • User567269486 posted

    what is the datatype of ds_laatste_fouten.View_overzicht_foutenDataTable ? I normally bind a datatable to a report using something like this

    ReportDataSource datasource = new ReportDataSource("datasourcename", datatable);

    Wednesday, August 31, 2011 10:10 AM