Solved

Visual Basic 2005 Express with Reporting service

Posted on 2010-09-11
1
418 Views
Last Modified: 2013-11-27
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)
    Me.ReportViewer1.LocalReport.SetParameters(parameters)

Open in new window

0
Comment
Question by:milindsaraswala
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
milindsaraswala earned 0 total points
ID: 33653565
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
      objDataAdapter.Fill(dsResult)

      objDataAdapter.Dispose()
    End If

    Dim dataSource(0) As ReportDataSource
    dataSource(0) = New ReportDataSource("DataSource", dsResult.Tables(0))
    Me.ReportViewer1.LocalReport.DataSources.Add(dataSource(0))


    Me.ReportViewer1.RefreshReport()

Open in new window

0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need a simple RegEx to search for two words 27 87
Problem to Office 1 45
VB.net/VSTO Excel Add-in 2 19
Blending HTML output from R Studio into a ASP.Net/C# project 4 23
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question