Visual Basic 2005 Express with Reporting service

I have created report in SQL Server 2005  Business Intelligence Studio with parameter.  Now I am using Visual Basic 2005 Express version.

I rename the report.rdl to report.rdlc. and copied into the visual basic 2005 express project folder Then added ReportViewer control on the winform and configure it with report than i try to run report is give me error Report missing a parameter value.

So I added following code in Report Load. Then it started giving me error Datasource not defined. But when I i double click the report file I can see the datasource already defined in XML with query.

So what can be problem and how to solve it.
Dim parameters(0) As ReportParameter
    parameters(0) = New ReportParameter("InvoiceMasterID", 11)

Open in new window

Who is Participating?
milindsaraswalaConnect With a Mentor Author Commented:
I got the solution for the same. I removed the parameter from the original file and put following code in the form load

Dim objDataAdapter As New SqlDataAdapter(SQL, strCN)
    Dim dsResult As New DataSet("Result")

    If Not IsNothing(objDataAdapter) Then
      '  ' Fill data into dataset

    End If

    Dim dataSource(0) As ReportDataSource
    dataSource(0) = New ReportDataSource("DataSource", dsResult.Tables(0))


Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.