Solved

Report Viewer

Posted on 2014-01-16
4
564 Views
Last Modified: 2014-01-18
I am us vs2010 and I am trying to build a report viewer.  The initial generation of the page at load when opening the report viewer works fine.  Brings up the data needed correctly in every way.  I am trying to get the report to change based on a parameter change selection in a dropdown box on the page.  I get a message saying 'A data source instance has not been supplied for the data source 'DataSet1'.  

Below is the code.  I have tried to embed the data source, but obviously it is not working.

DataSet - ManualDataSet.xsd
Report  - ManDataReport.rdlc
ReportViewer - ManualDataReport.aspx

Can anyone help?

Thanks

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            DropDownList5.SelectedValue = "NC0117"
        End If

    End Sub


    Protected Sub DropDownList5_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DropDownList5.SelectedIndexChanged
        Dim DieNumberParam(0) As Microsoft.Reporting.WebForms.ReportParameter
        DieNumberParam(0) = New Microsoft.Reporting.WebForms.ReportParameter("DieNumberParameter", DropDownList5.SelectedValue.ToString)

        ReportViewer1.Reset()
        ReportViewer1.LocalReport.ReportEmbeddedResource = "ManuaDataSet.xsd/ManDataReport.rdlc"
        ReportViewer1.LocalReport.ReportPath = "ManDataReport.rdlc"

        ReportViewer1.LocalReport.SetParameters(DieNumberParam)


    End Sub
0
Comment
Question by:rckrch
[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
4 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 500 total points
ID: 39788890
Please see this link with:
http://forums.asp.net/t/1960004.aspx?Dynamic+Report+Viewer+A+data+source+instance+has+not+been+supplied+for+the+data+source

Essentially it's looking for the datasource on rebind which you're not providing (I believe the reset clears it).
0
 

Author Closing Comment

by:rckrch
ID: 39791244
Thanks very much.  All I did was delete the reset statement and it works fine now.  Such a simple thing.  

Thanks very much.
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
How to increase the row limit in Jasper Server.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

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