Object datasources vanish from rdlc data sources in web project

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
projects



Answer this question

Object datasources vanish from rdlc data sources in web project

  • Ferry Lukito

    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:

    FDBK43122

    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.

    http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx feedbackid=8e140020-e33b-41f6-90d0-3648b691d25c


  • Davy Van Melkebeke

    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...



  • ampijanka

    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

  • DJ MCFLY - NY

    I have been experiencing this issue since beta. Has anyone reported this bug
  • Sukirman_J

    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...

  • Christy

    My WebSite Datasource is vanish too!
  • Priyank C

    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">
    <DataSources>
    <DataSource Name="DummyDataSource">
    <ConnectionProperties>
    <ConnectString />
    <DataProvider>SQL</DataProvider>
    </ConnectionProperties>
    <rd:DataSourceID>41dd4cb9-4901-4b16-8239-453f84dfe8d2</rd:DataSourceID>
    </DataSource>
    </DataSources>
    <BottomMargin>1in</BottomMargin>
    <RightMargin>1in</RightMargin>
    <rd:DrawGrid>true</rd:DrawGrid>
    <InteractiveWidth>8.5in</InteractiveWidth>
    <rd:SnapToGrid>true</rd:SnapToGrid>
    <Body>
    <ReportItems>
    <List Name="list1">
    <Left>0.125in</Left>
    <ReportItems>
    <Textbox Name="YearApproximate">
    <Left>2.875in</Left>
    <rd:DefaultName>YearApproximate</rd:DefaultName>
    <ZIndex>2</ZIndex>
    <Width>1in</Width>
    <Style>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingBottom>2pt</PaddingBottom>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    </Style>
    <CanGrow>true</CanGrow>
    <Height>0.25in</Height>
    <Value>=Fields!YearApproximate.Value</Value>
    </Textbox>
    <Textbox Name="Name">
    <rd:DefaultName>Name</rd:DefaultName>

    (etc.)

    So, are you modifying stuff in the <DataSources></DataSources> block

  • hklbj

    Any news with this problem My team can't write any reports because VS keeps dropping data sources at random.

  • Mal555

    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

  • mBurger

    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.


  • Peter Griffith

    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.

  • coreyw2008

    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.

  • xpmedia

    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.
  • QuetzalNeTGt

    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

  • Object datasources vanish from rdlc data sources in web project