Solved

Report Viewer

Posted on 2014-01-16
4
549 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
4 Comments
 
LVL 39

Accepted Solution

by:
Kyle Abrahams earned 500 total points
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now