.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Message: A data source instance has not been supplied for the data source 'DataSet1'.

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application


I'm getting this message when trying to run my Report Viewer

A data source instance has not been supplied for the data source 'dsNewDataSet'.

The following code are below:-



using System;
using System.Data;
using System.Data.Odbc;
using System.Web.UI;
using Microsoft.Reporting.WebForms;

public partial class rptViewer : System.Web.UI.Page
    private OdbcConnection conn;
    private string _path;

    protected void Page_Load(object sender, EventArgs e)
        conn = new OdbcConnection(System.Configuration.ConfigurationManager.AppSettings["ConnectionString"]);

        if (Request.ApplicationPath == "/")
            _path = "http://" + Request.Url.Host;
            _path = Request.ApplicationPath;


        if (!Page.IsPostBack)

    private void rptGetDataset()
        DataSet ds = new DataSet();
        ds.DataSetName = "dsNewDataSet";
        string sql = "";
        OdbcDataAdapter da = new OdbcDataAdapter(sql, conn);
        ds.WriteXmlSchema(_path + "/App_Code/Data

View Complete Post

More Related Resource Links

A data source instance has not been supplied for the data source 'DataSet_ApplicationCV'


i have an webapplication and i have 2 reports first report give me list with all application i have in my database table when i click on one id of this list it shuld rediract me to the second report that take 2 parameter from first report

inside the first report i set the navigation and send parameter value

when i run my page that have first report it is ok run but when i click on the any id to go to next report that have detailes it give me this error

  • A data source instance has not been supplied for the data source 'DataSet_ApplicationCV'
  • i understand that  the datasource for second report not set in report viewer but how can i set both dataset and wht if i have subreports inside the second report

    code for report viewer:

    <%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="ApplicationReport.aspx.cs" Inherits="Webis.admin.ApplicationReport" %>
    <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
    <asp:Content ID="Cont

    MDW Disk Usage for Database Report Error - A data source has not been supplied for the data source D

    Hello, On the MDW Disk Usage Collection Set report, I get the following error when I click on a database hyperlink. A data source has not been supplied for the data source DS_TraceEvents SQL profiler shows the following SQL statements are executed (I've replaced the database name with databaseX) 1. exec sp_executesql N'SELECT dtb.name AS [Name] FROM master.sys.databases AS dtb WHERE (dtb.name=@_msparam_0)',N'@_msparam_0 nvarchar(4000)',@_msparam_0=N'databaseX' this returns zero rows as databaseX does not exist on my MDW central server, but is a database on a target server (i.e. one that is being monitored and uploaded into the MDW central server). 2. USE [datatbaseX] this produces the following error: Msg 911, Level 16, State 1, Line 1 Database 'databaseX' does not exist. Make sure that the name is entered correctly. why is the report looking for the database on my server? thanks Jag Environment: MDW (Management Data Warehouse) on SQL 2008 R2  

    Toolbox: Data Snapshots, Subversion, Source Code Organization and More


    If you want to save, organize, and annotate snapshots of your database data, find an easy way to install and configure Subversion, and automate the organization of your source code, then you'll want to read more about these latest tools.

    Scott Mitchell

    MSDN Magazine August 2009

    Data Points: Data Source Controls in ASP.NET 2.0


    ASP. NET 2. 0 introduces a series of new tools that improve data access including several data source and data bound controls. The new assortment of data source controls can eliminate a ton of repetitive code that was required in ASP.

    John Papa

    MSDN Magazine January 2005

    Empty Website Data Source windown


    Hi all,

    I am Visual Web Developer user and facing a problem when I am creating a local report (.rdlc) file.

    I am using Business objects as the Data Source for this report. It was working perfectly until all the items in the Website Data Source window suddenly "disappeared". The "Add New Data Source" button on this window is also disabled. Now the window is just like a blank box only. And I can't continue working with the report file like this...

    I have tried undoing what I did before but it does not help at all...

    Any reason for this to happen? There is no sign or something at least indicating what is wrong.

    Please help.


     ps: found a similar thread in this forum but not solved

    The report cannot be opened because the data source associated with it is not a report model.


    i tried to open a report i created in sql business intelligence development studio in the report builder in wss3 and it gave me this error:

    Microsoft.ReportingServices.ReportBuilder.ReportModel.Report: The report 'http://servername:port#/Reports/report.rdl' cannot be opened because the data source 'http://servername:port#/DataSource Library/datasource.rsds' associated with it is not a report model.

    This report was not created in Report Builder. Try opening this report in Report Designer instead.

    can i fix this so i can open my reports in report builder?


    BDC Entity as a Data Source for a Lookup column

    Is it possible to create a custom lookup field type to have a BDC entity as the data source?

    GridView editing without using data source controls?


    I am binding my gridview without using a datasource control and instead doing it in the code behind. However, I would like to use the inline editing features of the gridview. Could someone please point me to an example that does gridview editing/updating 'manually' in the code behind?


    Creating a SharePoint 2010 Web Part That Can Read and Write Data to an External Data Source

    Learn to use Visual Studio 2010 to create a Visual Web Part that uses a BCS external content type in SharePoint Server 2010 to read and write data to the AdventureWorks sample database.

    Sample: Creating a SharePoint 2010 Web Part That Can Read and Write Data to an External Data Source

    Explore the code in this visual how-to article as you learn to use Visual Studio 2010 to create a Visual Web Part that uses a BCS external content type in SharePoint Server 2010.

    XML Source (Data is not loading to Destination ,Package Runs sucessful)

    Hi First I run execute SQL Task SELECT TOP(10) [Message],opportunity_Id  FROM SBP FOR XML PATH ('GS_Opportunity'), ROOT('GSOpportunities') That will make 10 different file into single file then i have assigned this output to variable and it will output as XML Now I put Data flow task ,in it I put XML task and in source i have put XML Data From Variable and I select XSD file location,now XML task is showing me different source table and i have selected appropriate destination table but when i run this package it will not transform data from source to destination,Can you suggest me what is the problem i try to put data viewer it is not transforming any data  while insted of if i select direct file location instead of variable it is running good    

    VS 2010 and data source issues

    I've been banging my head against the wall for the past 4 hours on this one and think I'm going to need a little help here. I must be missing something. I'm in VS 2010 on Windows 7. I've got a web project which has been going fine, but no matter what I do I can't get a data source to show up in the Data Source window. I've added a data source using Data > Add New Data Source, and the "wizard" appeared to complete successfully. I have a data source showing in my solution explorer, and if I open the .xsd file I see all my tables from a remote SQL 2005 database. I have a good data connection to the database server showing up in the Server Explorer window. But no matter what I do I cannot get anything to appear in the Data Sources window, which is greyed out (the commands at the top are grayed out and there's gray text in the middle of the window reading "There are no data sources to show for the selected project"). Under the main Data menu at the top of VS, the "Show Data Sources" and "Add New Data Source" commands are missing. I can sometimes get them to reappear if I restart Visual Studio or reboot the OS, but not consistently. I've been all over Google on this and have tried every suggested solution I can find, to no avail. Anybody have any ideas? Thanks.

    Data Source View Gives incorrect Error--Different Data Type

    Hi, I'm creating a report model (2008 R2).  I am trying to create a relationship between two tables.  One FKs to another--same name and type (tinyint) columns.  But the Data Source View editor doesn't allow this, giving the message "...source and destination column have different data types".  But the columns are the same types.  I ahd this once before  acouple of years ago and don't remember how I got around it. Does anyong have ideas?  

    Data Source View

    I followed this below procedure for create a DataSource View In Solution Explorer, right-click Data Source Views, and then click New Data Source View. On the Welcome to the Data Source View Wizard page, click Next. The Select a Data Source page appears. Under Relational data sources, the Adventure Works DW data source is selected. Click Next. On the Select Tables and Views page, you select tables and views from the list of objects that are available from the selected data source. You can filter this list to help you in selecting tables and views. ( My probelm comes in 4th step, I see my server name in Relational Data sources area, i click next to select Tables & Views but i dont see any list of tables in there..? What am i Missing? Today is my day one on SSAS...please HELP FM

    mysql data source provider - mysql connector/net

    Dear All, I having problem installing mysql connector/net 6.2.3 on my vsd 2010 because the installed went smoothly but when Im trying to use the mysql on data source provider, I cant see it on the list and when try to install/change the connector the visual studio integreation has an x mark meaning to say it was not installed on my vsd2010.  Thanks.

    Menu Data Binding from XML source

    Hi , I have the following complex XML structure. I need to bind the values to menu via Binding from the XML source <Editions>      <Edition Name="A">            <Products>                  <Product Name="1">                        <Platforms>                              <Platform Name="11">                                    <A1 Name="A"/>                                    <B1 Name="B"/>                                    <C1 Name="C"/>  

    Is it possible to have a dynamic data source

    I am looking to develop a SSRS report, and the idea is that I want to view backup history on various DB servers. I would like to have a drop down list of servers, and from there I can choose a server and a query will run on that server. I have been trying to find out some information on this, but my understanding is that this can be done via URL, but not sure if thats the best way to do this. Thanks.
    ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
    Sql Server  SharePoint  Silverlight  Others  All   

    Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend