Object datasources vanish from rdlc data sources in web project RRS feed

  • Question

  • Anyone having issues with their object datasources appearing and
    vanishing from the datasource browser?

    I create an object for binding as a datasource in my App_Code folder,
    compile my web project and it appears in the datasources in the report
    designer.  Then I will make an aspx, setup a reportviewer control for
    my new report, go back to the rdlc and the object datasource sometimes
    just vanishes.

    I refresh, no luck.

    The only solution I found is to draft the rdlc to the App_Code folder
    where my class is, then refresh datasources and it finds it.  Then if I
    move it away, they vanish again.

    Am I missing something on how the object datasources work in web

    Tuesday, November 22, 2005 4:15 PM


  • Both Reporting Services and Visual Studio are currently investigating this problem.  At this point we don't have a better workaround to offer you.  As soon as we have a fix or workaround available we will post it here.
    Tuesday, January 24, 2006 10:18 PM

All replies

  • Do you have at least one .aspx file open? Because of a bug in Web projects, Report Designer is only able to get a list of available objects if you have at least one .aspx file open. Open a .aspx file, then close and reopen Report Designer.
    Tuesday, November 22, 2005 6:13 PM
  • Sometimes it seems to work sometimes it does not.  Like i just was editing my RDLC, and suddenly it made another datasource in the Report->Data Sources, mydatasource1 in addition to mydatasource.

    Why does that happen?

    Also I will delete the mydatasource1, go back to my report, and bang the datasource window refreshes with no business objects in it (an aspx page is open).

    No matter what I do, rebuild the project, open/close rdlc with aspx open, close VS and reopen everything, nothing works.

    Any other workarounds?
    Wednesday, December 7, 2005 7:37 PM
  • This is still a problem, has anyone else encountered this?

    I build my project, open an aspx like Rajeev said, open a fresh new RDLC, bang, website data sources show NONE of my business object datasources.

    I close open .net a bunch, recompile, move files around and sometimes it refreshes with them there.

    This is INSANE and destroying my productivity, can ANYONE else help???
    Tuesday, December 13, 2005 8:03 PM
  • I am encountering the same issue.  I initially thought it was related to a Web Referrence in my Project and opened a Support Incident with Microsoft.  Since that time, I have been having nothing but trouble with my object data sources.  Most of the time (95% or more) the object data sources are simply not there.  This is also creating major problems with my productivity.

    The last I heard from Microsoft is that they are going to talk with the Reporting Services team (who built this component) and see if there is something they can do to fix the problem.

    Tuesday, January 10, 2006 5:08 PM
  • I have been experiencing this issue since beta. Has anyone reported this bug?
    Thursday, January 12, 2006 5:15 AM
  • I have reported the bug and it is under review with MS, please go vote 5 for importance and validate it and such, it is:


    at http://lab.msdn.microsoft.com/productfeedback/default.aspx

    this is the direct link, not sure if it will work, but bugs with more votes get more attention, rather then dupe bug entries.


    Thursday, January 12, 2006 9:12 PM
  • Well I'm glad I'm not going crazy. I too have been having this issue though I must have spent a few days thinking it was my business object code that was broken. Anyway I went and voted on the bug for whatever good that may do. Your link works fine.

    I would lov eto hear if anyone finds a workaround. I have been pulling my hair out trying to find anything that might make this work the way it should... 

    Monday, January 16, 2006 11:15 PM
  • Both Reporting Services and Visual Studio are currently investigating this problem.  At this point we don't have a better workaround to offer you.  As soon as we have a fix or workaround available we will post it here.
    Tuesday, January 24, 2006 10:18 PM
  • Any news with this problem?  My team can't write any reports because VS keeps dropping data sources at random.
    Tuesday, February 7, 2006 5:29 PM
  • Well I am using business objects exclusively in my report as the datasources. I have looked at the codebehind in the .rdlc using a text editor (it uses a nice readable xml format) and manually assigned the correct datasource when it gets stuck. Once you do that it seems fine from then on. Not sure if that will help or not...
    Tuesday, February 7, 2006 9:03 PM
  • Thanks for the tip.  Clarification:  where and what are you changing manually?  For instance, here's some XML from a test RDLC form:

    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
        <DataSource Name="DummyDataSource">
            <ConnectString />
          <List Name="list1">
              <Textbox Name="YearApproximate">
              <Textbox Name="Name">


    So, are you modifying stuff in the <DataSources></DataSources> block?
    Tuesday, February 7, 2006 11:57 PM
  • One thing that has also worked for us is, if opening an aspx file does not refresh the datasources list, try choosing Reset Window Layout from  the window layout. This refresh the list for us but only after we'd also opened an aspx file.
    • Proposed as answer by Andrew Backway Wednesday, September 5, 2012 11:54 PM
    Tuesday, March 7, 2006 1:39 PM
  • My WebSite Datasource is vanish too!
    Thursday, March 9, 2006 9:20 PM
  • We have found a general workaround for this problem.

    This works for us because we use a data layer which is stored as a reference in our ASP.Net bin folder in our project:-

    1. Right click on the bin folder and choose Add Reference
    2. Choose 'Browse' then browse to the bin folder of your site and choose an existing dll
    3. This will create a .refresh file underneath the selected dll
    4. Check your Website data sources, choose refresh (will likely still be empty or incorrect)
    5. Right click on the .refresh file and choose Delete
    6. (optionally) Close/open a  .aspx file from the root of your web project. This often causes a refresh.
    7. Switch back to your report file, if not showing your data sources, choose refresh again - if still not showing try step 6 once more.
    8. If still not showing phone microsoft tech support and spend your life on hold (hopefully it's worked for you already though!)
    9. Contemplate early retirement.
    Hope this works for others too,
    Christopher Cook
    Webprofusion Ltd
    Thursday, March 9, 2006 10:14 PM
  • Hi, I think I've got the solution. If I'm wrong forgive me, but its working for me now. If your second class below returns "As List(Of Class1)" then the Business Object will show in Data Sources when opening a report. If the structure of your class is exactly like below it will work.

    Imports Microsoft.VisualBasic
    Imports System.Collections.Generic
    Imports System
    Imports System.Data.SqlClient

    Public Class Class1

    Private _symbol As String
    Private _volume As Integer
    Private _price As Double

    Sub New()

    End Sub

    Sub New(ByVal symbol As String, ByVal volume As Integer, ByVal price As Double)
    _symbol = symbol
    _volume = volume
    _price = price
    End Sub

    Public Property Symbol() As String
      Return _symbol
    End Get
    Set(ByVal value As String)
      _symbol = value
    End Set
    End Property


    Public Property Price() As Double
    Return _price
    End Get
    Set(ByVal value As Double)
    _price = value
    End Set
    End Property


    Public Property Volume() As Integer
    Return _volume
    End Get
    Set(ByVal value As Integer)
    _volume = value
    End Set
    End Property

    End Class

    Public Class Class2

    Private m_products As List(Of Class1)

    Public Sub merchant()
    m_products =
    New List(Of Class1)
    New Class1("Pen1", 23, 22))
    New Class1("Pen2", 23, 22))
    New Class1("Pen3", 23, 22))
    New Class1("Pen4", 23, 22))
    End Sub

    Public Function GetProducts() As List(Of Class1)
    Return m_products
    End Function

    End Class

    Monday, March 20, 2006 8:43 AM
  • Has anyone found a work around this is getting very frustrating?
    Tuesday, May 23, 2006 11:46 AM
  • Hi, I've posted some code on how the Object DataSource should return a collection of a class. It only worked for a week or so and then the source was gone. The report though still worked.

    I've found another approach that I think is worth trying out: I still create my Object DataSource and bind it to the ReportViewer. I then create a DataSet selecting only the fields that I want displayed on the ReportViewer. Use the Dataset in your 'Website Data Sources' to drag on you fields (designing the report).

    The Business Object can now fetch the data and return it as a DataTable or DataReader or a collection of the Business Object. If you use 'collection of Business Object' make sure the properties has got the same names as the field names in your DataSet that you've used to design the report.

    The DataSet will not vanish and you basically only use it to design your report with it. The data that get binded to the report are handled by you Business Object.

    Hope this makes sense.

    Tuesday, May 23, 2006 12:34 PM
  • Milass your first post works as long as that class is part of my website but all of my BO's are part of a seperate assembly.

     I do not want to work with datasets at all I only want to work with my business objects but I may give your second solution a try.  All of my BO's are in a seperate assembly and it works about half of the time where I can drag and drop BO's to my report. 

     I have found if I create the report in the actual assembly that contains all of my BO's I can build object data sources and they seem to work fine, but I am stuck on loading them from the assembly or embedded resource at runtime (this is new to me)



    Tuesday, May 23, 2006 12:46 PM
  • Jerry:

    Any progress on a workaround for this bug?  Your post is from January.  It is now July!



    Saturday, July 22, 2006 10:54 PM
  • Ok, I found out what causes the data source to vanish in my case.  If I add a COM reference written by a company called ESRI, they vanish.  If I delete the COM reference, they come back.  What a hassle!  I imagine that some of the other posts on this thread are a result of DLL conflicts as well.

    Microsoft: This is a repeatable bug.


    Monday, July 24, 2006 2:17 AM
  • Thanks for the tip, I have had success using the text editor to re-add the correct data source. Another thing that I noticed was that the connection string used in the .rdlc is the connection string that is used in the server explorer, not the web.config connection strings. I am using MySql as my site data source and have created all of my datasets from that source. I just think that the connection string has to be fixed and should mirror the connection string used in the dataset table adapter. This could be part of the problem. I don't know.
    Wednesday, August 9, 2006 2:45 PM
  • So now Microsoft has investigated this problem for more than 6 months, and there still is no solution to this problem? This is a very annoying bug which makes working with the report control totally frustrating. So Microsoft, are you listening at all, could you give us at least a workaround or indicatin that you actually are doing something? In the bug database, you have just closed this issue without any workaarounds or explanation. Easy way to take care of bug report: just close the issue and forget it ?!
    Tuesday, August 15, 2006 2:40 PM
  • I'm posting this 10 months after the initial post - I have the same exact problem, and worse... every solution posted here has worked once for me, but not twice. 

    I have to move on from this technology, and recommend to my team that they not touch it.  It might as well never have been built.

    Sorry, and good luck.
    Friday, September 8, 2006 1:27 PM
  • I've spent most of the day today with the same frustration, but have found the reason why this is happening.

    The object data source shows up so long as I don't have the class defined with the DataSource or DataSourceAttribute attributes. I have a bunch of classes defined with this attribute that do not show up, but once I remove that attribute, there they were.

    Obviously it's not ideal to remove that attribute if you want the classes to show up as data classes when adding a data source to an ObjectDataSource control, but all in all it's not a big deal. Too bad so much time is spent on these little things, though.

    Wednesday, September 27, 2006 8:31 PM
  • Its almost 7 months later, I have some people at MS working this ticket for me.  So far nada.
    Thursday, March 1, 2007 9:33 PM
  • At present, I'm developing an intranet project along using the Beer House starter kit as a sort of template and, wanting to add reporting capabilities to it, have run into the same problems as the other posters, with the added wrinkle that when the website datasources actually do turn up, I can only see classes in my DAL, and nothing from the BLL. You can experience the same frustration by downloading the Beer House kit from the official ASP.NET website and trying to add a report to it. On one machine I get nothing, and on the other only a few classes from the DAL.

    Does anyone know the current status of this? I find it hard to believe that such a long-standing and obvious bug still doesn't appear to have been rectified, especially as it renders the reporting control pretty much useless.

    Thursday, March 8, 2007 12:02 PM
  • After many months we have found a workaround which may help.  We noticed that the datasources window is often blank the first time you open a solution, but if you close and reopen the solution, it works. To clarify, if the datasources window is blank, select File\Close Solution, then File\Open\Solution without exiting VS.

    Hope this helps.  There may be more than one bug involved, so we are not sure it fixes all instances of the problem.


    Thursday, March 22, 2007 2:01 AM
  • End of March, and the ms guy who was helping me (sql server team) has given up.  My ticket now points to a similar ticket, this one for the vs team.  Which has always made sense - once you make a report, it continues to work, even if the objects have disappeared.  Its pretty crappy; once when I went to Data/Show Sources, there was also an "Add Sources" option.  I selected it, and there was a dialog whether you wanted to create a dataset, a web service, or a business object (if you create a windows form app, you always get this dialog).  Thinking Id found nirvana I selected business object, and got a weird runtime error.  Actually, come to think of it, I was able to duplicate it, take screen prints, and send them to vs.  The guy who was helping me from the sql server was amped, said we could squich it, and a week later hasta la vista.  I had the same idea as the other guy posted, use a dataset as sort of an intermediary.  When I looked into the hassle to do so I decided it wasnt worth it.

    I wonder if anyone from ms is bothering to look at this. 

    Monday, March 26, 2007 7:06 PM
  • I posted a workaround at the bottom of this thread.  Does that help you?



    Tuesday, March 27, 2007 10:08 PM
  • Thanks, Albert- unfortunately that doesn't work for me.


    The main problem I'm having is not so much that no datasources are shown, but that only a subset of them appear. The problems I was having can also be replicated by downloading the Beer House sample application from the official ASP.NET site and creating a report in the project. Only classes in the DAL are shown, no classes from the BLL appear. There doesn't seem to be any rhyme or reason to it. I can get by by hand-editing the report's XML, but it's a bit of a chore to be honest, especially if there are several fields.

    Wednesday, March 28, 2007 10:35 AM
  • I cannot get any website data sources to show up for the Report. 


    Has anyone gotten a good response from Microsoft.  There seems to be scarce information about this out there.

    Wednesday, March 28, 2007 3:21 PM
  • Yes it did, for awhile.  I noticed that behavior fairly early on this, and I could have lived with it.  Doesnt make a difference now.

    I just used refractor on the source of vs.net 2005 and saw this:


    public static AllowReportToWork(Microsoft.Framework.System.Reports rid)


           if (rId=Microsoft.Framework.System.Reports.VisualStudioReports.BusinessObject)


                int foo= ReturnDecreasingLackOfProbability();


                return foo;



                return true;



    Sorry for the cynicsm.  On second thought, Im not.  I just had to tell some users that reporting for the new app will have to be re-architecture.  Appears I bet on the wrong horse.


    Thursday, March 29, 2007 8:31 PM
  • Any solution??


    Why MS feedback is closed? Is it corrected? Any fix?





    Thursday, April 5, 2007 11:32 AM
  • I believe that I have a workaround that will consistantly refresh the website datasources window. I moved the rdlc file that I was working on to the app_code folder at the base of my project. I have opened it and worked with it several times without any problems. I also noticed that if the data sources disappear when I am working on one of the rdlc files that is not in my app code folder and the data sources disappear that I can open the one that is in the app code folder, the data sources appear for that one and from that point on the data sources appear for all rdlc files.


    I belive you can either move all of the rdlc files to the app_code folder or simply place a dummy rdlc in the app_code folder and when the problem occurs, open the dummy one to get the datasources refreshed. I hope this helps everyone....

    Monday, April 30, 2007 12:34 PM
  • I having the same problem - I've tried everything suggested here but nothing has added my custom object to the website data sources list.  I went and voted on the bug.  I doubt it matters - this looks like MS has abandon the control.
    Wednesday, May 2, 2007 2:11 PM
  • I had this problem.


    Took a while, but it seems Visual Studio 2005 Service Pack 1 caused the problem for me. 


    I removed it, the objects were back. I installed it again, objects gone.


    Hope this helps someone or more info comes from this.

    Friday, May 4, 2007 8:51 PM
  • This posting saved my day - yes, I added a dummy .rdlc file to the app_code folder, saw all website datasources showing up, then opened my .rdlc files in a folder outside the app_code, and problem gone.


    Thanks PBallance! There can be many other getarounds, but this one is most economic.

    Thursday, May 10, 2007 2:42 PM
  • A combination of two proposed solutions has apparently worked for us. The first solution proposed was that an ASPX file must be open. With a lot of experimentation I've found that default.aspx must be open first (not any aspx, it must be default.aspx). Second, opening any RDLC from the App_Code folder will load all of the custom objects. These 2 steps together has worked 100% of the time for us. Using the steps individually would work sometime and not others. Sometimes we would get system objects, but not our custom objects. Sometime we would get only SQL Data Sets. However, opening the 2 files I mentioned together allows us to open other RDLC files and have all objects available every time. Closing default.aspx will sometimes cause the objects to vanish, but opening it again causes them to re-appear. Hope this is helpful...
    Friday, May 11, 2007 5:38 PM
  • Well,


    One and a half year after the thread has started the problem still persists. And as the new version of Visual Studio is almost ready to ship, it has surely been left aside.


    Nevertheless, I would like only to comment that the solution that tells we should keep default.aspx opened and the .rdlc file in the \app_code directory works for me. So, that is the work around I adopted.




    Tuesday, June 19, 2007 2:39 PM
  • It is now June 2007, Microsoft considers this issue resolved and closed:



    They don't offer any advice on how to use this tool, but I'll bet they're demonstrating it at trade shows.


    This is typical of Microsoft, make something for a group demo but it won't work for *** when you try to do actual work.




    Tuesday, June 19, 2007 3:35 PM
  • A QFE is in the works to fix this issue.  Normally, QFE's are issued fairly quickly, but this one has taken so long I don't want to make any predictions. Thanks for your patience.



    Wednesday, June 20, 2007 8:43 PM
  • Hotfix KB939768
    Wednesday, July 25, 2007 2:43 PM

    I've business objects in a 'class library' which is a seperate project in my web application.

    Some business objects show there, some do not.

    The important ones do not.


    I couldn't find any Hotfix KB939768.



    Monday, July 30, 2007 2:00 PM
  • You need to request the Hotfix from Microsoft Customer Support.  Use this link: https://support.microsoft.com/contactus2/emailcontact.aspx?scid=sw;en;1410&WS=hotfix and request article number 939768. 



    Monday, July 30, 2007 6:33 PM
  • You can add another voice to the collective screams for help. Microsoft please stop putting out technology and saying it works our Pinhead Bosses and Pinhead Clients believe you and then we get skewered when things do not work. Please stop. Considering early retirement. 


    On the First Day Microsft made the Dataset.

    On Second Day (it was a half day) Microsoft made the Object.


    The Object never did live up to Microsofts expectations.
    Thursday, August 2, 2007 5:16 PM

    I installed the Patch but I am still unable to browse the objects I need. I will have to succumb to using a DataSet definition to create the report.
    Thursday, August 2, 2007 8:54 PM
  • You guys deleted the comment by that mad britton, I guess you can censor it's your site.


    Anyway for those who are interested as I stated in my previous comment even after the patch I was unable to see my object data sources in the Web Site Data Sources window. I finally broke down and in a completely separate project Created a dataset source upon doing this my object data sources in the app_code folder appeared and were usable in the Web Site Data Sources. So there another slimy feeling work around.

    Monday, August 6, 2007 2:42 PM
  • I got the hotfix by requesting it from the link above.  It didn't work, I still don't have any website data sources.


    Just fyi.

    Thursday, August 23, 2007 12:41 PM
  • FYI


    I was able to have the Object Data Sources showby creating a dataset source from a stored procedure. Once the sproc Datasource was on any object data sources in my app_code directory also appeared.




    Thursday, August 23, 2007 12:45 PM
  • I just want to confirm that the two work arounds do indeed work --- most of the time.  At least often enough to not be annoying.  I'd like to also add that while trying to get those two fixes to work I discovered that if you right click the app_code folder and do a view class diagram it will generate a new class diagram if not there already.  Then for some automagical reason the web datasources will appear.  Go figure.  I even had a few more show up that I didn't see before with the other two fixes.  Anyway, I thought I would help relieve the collective headache by sharing.

    Monday, September 10, 2007 8:37 PM

    Has any body found a fix for this?  I tried all the work arounds in previous post and the MS hot fix at http://support.microsoft.com/kb/939768 but did not work.

    Friday, February 8, 2008 2:57 PM
  • If anyone is still following this thread, I have not too good news: Exactly the same behavior is happening in VS2008!!!!!!!! The same workaround of inserting a dummy report on app_code half-works (sometimes yes, sometimes not). Which means... they say they improved the Reports tool, but they didn't fix something basic for a real life user!
    Half day lost in assuming corrections were done on the tool...
    Tuesday, July 29, 2008 8:25 PM
  • I'm getting the wierd datasource behavior as well in Visual Studio 2008.  The datasource objects appear (most of the time), but you cannot refresh the properties if they have changed in the underlying object..  Argh!!  This has been an ongoing issue for quite some time (VS 2005 - VS 2008) and seems like it should be so easy to fix.  Microsoft, get your head out of the sand.... please!!!!!!!!!
    Wednesday, August 27, 2008 3:21 AM
  • Dummy.rdlc  in app_Code works for me, too. Once I created a dummy.rdlc in tha app_code folder, all the data sources appeared miraculously, even for the .rdld reports outside the app_code folder.

    Thank you all for posting here, you helped me find a solution in an hour, can't immagine what you were going through.
    • Proposed as answer by KirtC Monday, October 25, 2010 11:27 PM
    Thursday, February 12, 2009 11:49 AM
  • I have this issue with Visual Studio 2008, all SPs installed. If I start a new project , create a report, I can add data source, in my current project, the new data source button is disabled, was there ever a fix?
    Tuesday, June 16, 2009 2:20 PM
  • I too had no datasources displaying in datasources window.
    I tried several things from this thread- all to no avail.
    I re-opened Visual Studio and all the datasources displayed fine.
    Monday, September 21, 2009 7:52 PM
  • Hi,

    Here it's a simple issue! What u have to do is open a rdlc report in desion view
    then u can see "Data "  in the menu.

    Then click Data----> Show Data Sources (Shift+Alt+D).


    Wednesday, October 21, 2009 5:54 AM
  • It's now the end of 2009 and this issue still persists!  Come on MSFT!

    In the meantime, I have a workaround that may work for some developers out there.  I'm currently working on a multi-layered web site project using .net 2.0.  My solution contains the web site project plus several class library projects that form my Business Layer (BL) and Data Access Layer (DAL).  My BL defines business objects (not datasets) that I want to use as datasources for my .rdlc report.  My DAL queries the database and passes generic lists of business objects back to the code-behind files in my UI.  I then programatically pass these lists to the report using:

    Dim myList as List(Of MyBO) = MyDao.GetBusinessObjects()
    ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("MyBO", myList));

    As everyone else has noted, business objects have a hard time showing up in the Website DataSources window.  Granted, having the datasources show up there makes it much much easier to design the report by dragging and dropping fields onto the .rdlc design template, but it is NOT a requirement.  You can still build the report without your objects displaying in the Website DataSources window, but the workaround can be relatively labor intensive.  The goal is that the .rdlc needs to have some knowledge of what data to expect so you can design the layout by placing textboxes and other report elements.  Ideally, you would do this by dragging and dropping fields from the Website DataSources window, but you can also add datasources to your .rdlc manually by directly editing the underlying XML of the report.  To see what I mean, right-click the .rdlc in Solution Explorer and select "Open With..."  then choose "XML Editor."  That opens the .rdlc in its native XML format.

    To add your business object as a datasource, look for a section named <DataSets>.  If your report's XML doesn't have this section, add it.  Here's the XML for a simple business object datasource with an ID property, FirstName property and LastName property:

            <DataSet Name="MyBO">
                    <Field Name="ID">
                    <Field Name="FirstName">
                    <Field Name="LastName">

    This will add a class named "MyBO" as a datasource for the report.  The FieldName is the name of the field in report element expressions.  If you were to add an expression to a textbox on the .rdlc, you could now write something like:


    to display the ID in the textbox.  The <DataField> corresponds to the name of the public property in the MyBO business object.  Once the datasource has been added to the XML, you'll see the class and its properties appear in the report's Expression Editor.

    The pain is having to manually add the XML representation of all the business objects you plan to use in the report.  I'm sure you could create a tool to process each business object and spit out an XML file, then copy those contents into the .rdlc.  That's what I plan to do.

    I know this is not an ideal solution, but it works.  I hope this helps someone out there.  Good luck!
    Sr Software Eng
    • Proposed as answer by ida99 Sunday, February 7, 2010 4:42 PM
    Saturday, November 7, 2009 8:26 AM
  • I found something that helped me.

    I erased web reference and added it again and data sources appear.
    • Proposed as answer by JINPIN Saturday, April 3, 2010 2:13 AM
    Sunday, February 7, 2010 4:45 PM
  • All,

    Glad to see a lot of peoples have the same problem. Put a dummy RDLC under app_code folder works for me. It brings out the data source windows immeadiately. Hope this is helpful.

    Saturday, April 3, 2010 2:15 AM
  • Thanks Jinpin Adding the dummy RDLC to the app_code worked like a charm for VS2008 and my WSDS window is now populated again

    Thursday, June 24, 2010 1:15 AM
  • Hello,

    I had a similar problem and discovered that when the project assembly (where I create the report in) is in the GAC (e.g. previous deployment for IIS/SharePoint on development machine), the Website Data Sources window does not show the object (e.g. linq to sql classes - dbml)

    So check if assembly is not in GAC and if so delete it and restart VS.



    Tuesday, July 27, 2010 1:23 PM
  • Microsoft please assist me with this.  Creating the report in app_code and opening default.aspx do NOT work. I've rebooted, restarted VS, cleaned files in the .net temp dir and nothing works

    It is Sunday morning - I worked late every day last week because of bugs, I worked all day Saturday till 11 pm, most of the day spent chasing bugs (I was supposed to complete four reports, I completed one, and it renders incorrectly because of bugs).  I am now completely unable to use VS for anything I need to do.  I'm completely stopped. 

    Of course when I tryto submit this post I get an "Unexpected error" dialog.

    Hilarious, Microsoft.  I love it.

    Sunday, August 22, 2010 5:01 PM
  • Everyone:

    This behavior still persists in Visual Studio 2010 but I think that I have discovered an underlying cause.  None of the above mentioned solutions worked for me either.

    While developing a site I modified some of my datasources and realized that I had many unused datatable / dataset objects that I could delete.

    When finished deleting the datatable / dataset objects I then went to create an object datasource that would use one of the remaining datatable / dataset objects and noticed that I had no options available in my datasources selection dropdown.

    After many hours of reading both here and around the internet I right clicked the App_Code folder and selected...  "View Class Diagram".

    When looking at the Class Diagram, I noticed that several of the datatable / dataset objects that I had deleted were still being referenced there.

    I deleted the objects that I was positive that I had already deleted from the dataset window and then saved all.

    I then went back to my .aspx page and tried to create an object datasource and now all of my datasources have returned.


    Sorry for being so long winded, but I believe that the underlying cause for this issue is that the underlying code for the Class Diagram gets out of sync with the code in the datasets and that at this point, all bets are off.

    I'm not technical enough to explain it much further but I have found that removing bad references in the Class Diagram seems to clean this thing up.

    Good Luck!!!!!

    Friday, October 8, 2010 7:18 AM
  • I can't belive that this problem still persists in VS2010... 
    Friday, October 15, 2010 10:44 AM
  • I found something that helped me.

    I erased web reference and added it again and data sources appear.

    Thanks IDA, this works fine in VS2008 SP1 + ASP.NET + VB.NET + RDLC.

    :( MS...5 years with the problem!!!!

    Tuesday, October 19, 2010 10:54 PM
  • This is still an issue in VS.Net 2010.

    The only fix I have found:


    1. Create new Report file (.rdlc)

    2.  Move the file into the folder where your business objects/web service etc... are located. For example I am using web services so I move the report file I created to App_WebReferences.

    3. Under "Report Data" window where you create "new dataset" I click and select "New > Dataset"

    4. All my datasets are available.

    5. I close this window, I move the report file back to where I WANT TO PUT IT

    6. Report step 3 and all is there


    Microsoft, sometimes you really do astound me. Test your products and controls. Please.

    FYI: Who was responsible for deciding that Expression Design 4 (and I believe previous versions) should not have a crop or eraser tool??? Seriously. These are the staple diet of any designer. I was actually really impressed with Expression Design 4 but on finding the lack of support for the most basic commonly used tools for design I have to abandon the it. 

    Research, plan, develop, test, deploy. Simple, elegant. Please use!

    Tuesday, February 8, 2011 10:53 AM
  • THis issue is still present in VS2010.
    Tuesday, February 8, 2011 6:06 PM
  • The dummy rdlc worked for me too.

    I'm sick of screwing around with these stupid bugs and quirks in VS. 

    A 5+ year thread on the same bug!   The epitome of arrogance.

    Friday, February 11, 2011 6:42 PM
  • Could you provide some repro steps for this issue in VS2010? The original post is for VS2008 WebSite Datasource pane which was removed in VS2010 and replaced with the Report Data pane which works very differantly. We made some fixes around DataSource discovery in VS2010 SP1 and I would like to see if this issue has been resolved. Thanks!

    Matt M.

    This posting is provided "AS IS" with no warranties, and confers no rights

    Monday, February 14, 2011 11:55 PM
  • The original post is for VS2005. 

    I tried upgrading my web sites to VS2010, but encountered numerous glitches and reverted back to VS2008, so I haven't tried to reproduce this problem in VS2010.  Maybe ChinTan Jhaveri can provide this.

    Tuesday, February 15, 2011 3:47 PM
  • I cannot believe that the issue last so long and have encountered so many times that the website data source vanished. My experience is something wrong in the solution to cause web site datasource disappear. To bring it back, I did this:

    1. open any RDLC file. Here you may not see any web site data source

    2.click report-data sources on the menu. It will tell you what is wrong in the solution. (not necessary real wrong)

    3.search the whole solution with key word from above step

    4.exclude the file with the keyword, usually it is xsd.

    5.open rdlc again, it will show the web site data source.

    6. putting a dummy rdlc in the app_code folder will help most of time.

    hope this helps someone.

    • Proposed as answer by dynlist Friday, March 11, 2011 3:29 PM
    • Unproposed as answer by dynlist Friday, March 11, 2011 3:29 PM
    Wednesday, February 16, 2011 5:01 AM
  • I'm using VS2010, and got the same problem when I'm working on a report. The "Data Sources" pane is empty, and there is no way to add new one.

    However, a "Report Data" menu item is available for me from "View" menu. I can add new Dataset from "New"=>"Dataset..." within the "Report Data" pane.

    Good luck!



    Friday, March 11, 2011 3:36 PM
  • I also am using Visual Studio 2010.  This problem just started happening out of the blue.  After trying some of the workarounds proposed above, I was wasting time and getting nowhere.  So, even though it is completely ridiculous to have to do this, here is how I worked around it:

    1. Copy an existing report file that has an object data source defined.
    2. Browse to the ".rdlc" file on disk.
    3. Open the file in notepad.
    4. Change the GUID within the /Report/DataSources/DataSource/rd:DataSourceID node to a new GUID value.
    5. Modify the /Report/DataSets/DataSet/Fields node to match the object structure of the data source.
    6. Change the /Report/DataSets/DataSet/rd:DataSetInfo/rd:TableName node to the name of the provider object.
    7. Change the /Report/DataSets/DataSet/rd:DataSetInfo/rd:ObjectDataSourceSelectMethod node to the name of the method on the data source object.
    8. Change the /Report/DataSets/DataSet/rd:DataSetInfo/rd:ObjectDataSourceSelectMethodSignature node to match the method signature in the previous step.
    9. Change the /Report/DataSets/DataSet/rd:DataSetInfo/rd:ObjectDataSourceType node to the fully qualified name of the object data source type and assembly.
    10. Save the changes.
    11. Click "Yes" if prompted to reload the file within VS.
    12. Open the report in VS.
    13. Select the data source name in the "Report Data" window.
    14. Right-click and select "Refresh" (this subsequently crashed VS for me).
    15. Re-open the solution and build it.
    16. The correct data source fields are now listed.

    I am still unable to view properties on the DataSet but at least all the fields are now there and I can continue working...

    I'm sure a fix for this will be made available in SP1 (oh wait - it's been 5 years - so probably not).


    Monday, March 14, 2011 9:42 PM
  • Hey Albert - That one worked for me... thanks
    Sunday, March 27, 2011 1:05 PM
  • I am using VS2008 and working with a Web project, so I do not have RDLC files (only RDL) and do not have app_code. I haven't Report-Data Sources neither. Anu suggestions?



    Tuesday, June 28, 2011 6:30 PM
  • I am using VS2010 with WPF. I have wasted 3 days on trying to figure out why I can not see my datasources. I ALSO can not create a data source from an object now in the data source wizard. I have to copy a data source and then manually create it.

    So after days of playing around with this, I figured out that if I change the Assembly version number and rebuild the project, close the project and reopen it, my data sources suddenly appear.

    Still have the error creating a data source from an object. Ridiculously annoying and a total waste of my billable time.

    Any suggestions on how to fix this?

    Wednesday, July 20, 2011 7:09 AM
  • i've the same problem with vs2010 sp1....it's incredibile, the same bug for 5 years....good work microsoft! probably the very new features of VS2012 will be close the rdlc bug


    MCITP Enterprise Administrator - MCTS Virtualization - Operations Manager 2007 - Exchange Server 2007 - MCSE-M
    S.Net Blog
    WindowServer.it Learning Portal

    Tuesday, August 2, 2011 7:51 AM
  • Working with VS2008 and I tried uninstalling the whole suit. No luck. I had to format my machine and now it is fixed, at last.


    Monday, August 8, 2011 4:51 PM
  • I'm having almost the exact same problem. In my case, I'm creating a Web Application project, not a Web Site. After scouring the web for answers, it appears that nobody has found a solution or even a workaround. There are only two menu items under Data in the Visual Studio 2010 menu. Neither one is Add Data Source.  

    I think it has to do with a design flaw that prevents them from fixing it without a major rewrite. The reason for that is several semi-related forum posts describing problems deploying reports and object data source xsd files.

    Friday, September 2, 2011 12:31 AM

    Come on Microsoft, show us you are still a great company and please give us a solution once for all for this problem we are facing time after time  ....


    Thursday, October 27, 2011 4:19 PM
  • Do you get the feeling we are being ignored?


    Wednesday, November 2, 2011 5:44 PM
  • Can someone provide repro steps to get this behavior for Dev10? We are working on the next release and I would love to fix this issue however we have not been able to reproduce this. Thanks!

    Matt M.

    This posting is provided "AS IS" with no warranties, and confers no rights
    Thursday, November 3, 2011 4:43 PM
  • lol, it was working fine before I apply SP1 to visual studio 2010, but after that even the working project doesn't show the data sources, it is grayed out DAMN
    Monday, December 26, 2011 1:08 PM
  • Halo Everybody,

    I'm not sure if what you guys are having actually the same like mine.  Since last year I got problem with RDLC reporting, the problem was related to some datasource didn't appear in the RDLC Data Binding Panel.  After few days effort, I got that the datasource that comes from an object will be automatically hidden, if it has similarity structure to the early registered object.  

    So the solution is, you can create a generic class that can be used by all your report, or if you want to use the classes that has the same structure, you need to add a dummy field, just to let it passes designer "censorship".  


    Saturday, January 7, 2012 8:40 AM
  • MICROSOFT - Don't fix this problem!  We are trying to beat the world's record for the longest running, ignored and disregarded, Microsoft thread! (There is lots of competition, though!)



    Friday, February 3, 2012 8:05 PM
  • The way I can see now the menu is designing the report, and going to View - Report Data or Ctrl+Alt+D


    Monday, April 2, 2012 11:09 PM
  • I would love to fix this problem unfortunately we have been unable to reproduce this problem internally, can you provide specific repro steps for this and we can try to address this for the next release of Visual Studio. Thanks!

    Matt M.

    This posting is provided "AS IS" with no warranties, and confers no rights
    Tuesday, April 3, 2012 11:00 PM
  • Matt -

    The initial post describes the steps to reproduce.

    Sometimes problems are not reproducible in all environments. 

    A significant subset of users may experience a problem, but not all, and in a development environment the problem may not occur. 

    I have experienced this with applications I have developed. 

    Unfortunately for me, my users do not usually accept 'I couldn't reproduce the error' if there are a lot of them experiencing the error.




    Wednesday, April 11, 2012 3:10 PM
  • I got similar problem in vs2010 sp1 when working on an asp.net MVC3 project. In the Report Data > New > Dataset... pane, the Data Source dropdown list appeared to be empty, and only database source can be added in data source configuration wizard, while in other not-web-app projects there are database, service, object and sharepoint in the wizard.

    I have tried workarounds posted above. My class is in project.Models.DAL folder/namespace but placing dummy rdlc in app_code worked. Namespaces of my project and System.Data appear in the dropdown list after i created app_code and added dummy rdlc, and now persist even after i removed app_code folder again.

    Tuesday, May 15, 2012 4:12 AM
  • have we got any solution of this problem?? 
    Friday, August 31, 2012 9:59 AM
  • I wish.  I've spent two weeks trying to edit the RDLC as a XML file, to get it to work because of this problem.  Like an earlier poster, this is killing productivity!

    "Both Reporting Services and Visual Studio are currently investigating this problem.  At this point we don't have a better workaround to offer you.  As soon as we have a fix or workaround available we will post it here."

    SO, how is this an answer?  Why is the question marked answered when there is still no solution?

    Tuesday, November 13, 2012 10:37 PM
  • Not sure if this is the same thing - in VS2012 I can't actually select any ObjectDataSources for my report, using the smart tag and have now given up in frustration and gone back to VS2010 where that worked fine.

    But thinking about it there should be a way to do that in code.

    Can anyone help me there?


    Wednesday, November 14, 2012 7:22 PM
  • 7 years after the accepted answer, 3 versions of VS, and still an issue.

    Working on rdlc reports in Vs2012, and other than not having to search down and install the ReportView dll manually, still just as poorly implemented as ever.

    • Edited by devryan1 Friday, February 15, 2013 9:14 PM
    Friday, February 15, 2013 9:11 PM
  • Guys,

    Firstable, sorry about my bad english. I've been searching about this problem for a couple of days and I think I found the solution (in my case it worked). 

    According to the results of my search, if the reportviewer crashes it means that some library, dataset, datatable, business object is not being readed properly by VS (In my case, it is the 2008) neither by the ReportViewer. Interesting the fact that the solution was being compiled successfully. Thus, in my case there was a TableAdapter that had a query with a filter mistyped. Ex: "WHERE X <> -1". When I replaced the "<>" symbols by "&lt;&gt;", it worked like a charm. My suggestion is, if you finished a SQL command (INSERT, SELECT, UPDATE or DELETE), make sure that it is working properly by saving, closing the DataSet designer view, build the solution and open it again. If it opens with a XML editor, it means that there's something wrong. Otherwise, if it opens normally with the DataSet designer, then it's all ok with this DataSet.

    Hope that helps you to find what is causing this problem in each one of your cases. Apparently, there's not a single cause.

    Best regards.


    Wednesday, March 6, 2013 1:19 PM