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
Solved

Visual Basic 2005 Express with Reporting service

Posted on 2010-09-11
1
417 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
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

839 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