none
Problem with local reports (rdlc) VS 2017

    Question

  • Hi all,

    I have a problem with local reports. What happens is, and this is the second time, After modifying a report in the designer, the report can't be loaded anymore in the report viewer. (A data source instance has not been supplied for the datasource "Datasource_Name". Where Datasource_Name is just the name of my Data Source.

    If I look in the report designer, there is a data source, and a dataset in the report data pane. If I right click on the Tablix, the Dataset name is filled.

    If I go to my form, click the small arrow, select a report, then select Choose Data Sources, the Report Data Source and the Data Source Instance are empty. The Rebind Data Source does not work either.

    If I create a new report with the wizard, and choose the newly created report in the Report Viewer, all went fine. I can change the report in the designer and run it again with no problems. But after making a lot of changes suddenly I get the error described above and I can't run my report anymore. This is very annoying because I spent a lot of time creating them, and I don't have a clue to get rid of the error or solve the Report Data Source and Data Source Instance problem.

    Any Idea's? Maybe a corrupt XML File?

    regards,

    Mark

    Tuesday, May 2, 2017 9:30 AM

All replies

  • Hi Mark,

    Since I don't clear your problem, I find this article that may be helpful to you.

    Please refer to:

    https://www.aspsnippets.com/Articles/Using-ReportViewer-control-in-Windows-Forms-WinForms-Application-using-C-and-VBNet.aspx

    Best Regards,

    Cherry Bu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 3, 2017 8:50 AM
    Moderator
  • I have the same problem! I figure out that this will happen when you add a ReportParameter on a working report. After, i click the  small Arrow in the ReportViewer, there are no dataSources in the popup!

    In XML there is a change in syntax to define a ReportParameter. Before RS version 14, there are no "<ReportSections>
        <ReportSection>

    //Parameter info

     </ReportSection>
      </ReportSections>"

    Nodes.

    I'm using VS 2017 Reporting Service v 14.*.

    Please help us

    • Proposed as answer by Anachrom Thursday, August 31, 2017 5:19 AM
    • Unproposed as answer by Anachrom Thursday, August 31, 2017 5:19 AM
    Monday, June 5, 2017 1:22 PM
  • I have the same problema when I add a report parameter. VS 2017 Bug?
    Friday, September 22, 2017 10:58 PM
  • I am having the same problem. I have created the report numerous times and the problem re-occurs. I have noticed that I have to create the report immediately after starting Visual Studio Pro 2017 in order for Visual Studio to include the data source. After working on other parts of the application, the data source is no longer in the report.

    I have reported this as a bug to Microsoft. In the mean time, if someone has an answer to resolving this I would greatly appreciate it.

    Thanks,

    Isom


    • Edited by isomcsa Friday, November 10, 2017 10:32 PM
    Friday, November 10, 2017 10:31 PM
  • I can confirm that the problem occurs when adding parameters to the report.

    Is there no update or solution for this yet?

    Monday, January 8, 2018 9:40 AM
  • I also confirm that the problem occurs when adding parameters to the report.

    Tuesday, March 6, 2018 9:12 AM
  • When parameters are added, the report loses sections:
    <Body> .. </ Body>
    <Page> .. </ Page>

    Tuesday, March 6, 2018 9:33 AM
  • My solution:

    Into XML I copied the layout and the line

    <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition">

    from a working report

    Tuesday, March 6, 2018 10:01 AM
  • This is a major problem, even after the latest Visual Studio Update, which was dated early March of 2018, which is 15.6.4. I found a fix, similar to the above, but more details so anyone should be able to implement the work around. I got the fix from the Visual Studio Development Community forum, and here is what the individual proposed, and it worked for me;

    After some further investigation, whilst I do not the cause or the correct solution, I have worked out what is happening and how to manually fix it.

    It seems that adding a Parameter to an existing rdlc report, causes it to be upgraded to the 2016 reportdefinition which then causes the issue. The manual fix it to edit the report xml by doing the following:

    Remove the following section:

    <ReportParametersLayout> …… </ReportParametersLayout>

    Also remove the following element lines:

    <ReportSections>

    <ReportSection>

    </ReportSection>

    </ReportSections>

    Change the xmlns from:

    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

    To:

    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">

    You will now be able to see the Report Data sources.

    What I don't know is how to prevent this in the first place.

    I would have mentioned this persons name, but not sure if that is cool. Perform the edit listed above in Notepad or some plain Jane editor. I'm not sure if every report is going to need to be edited like this, as it is a pain, but I was able to select a datasource in the report viewer after the alteration to the .rdlc file. Why Microsoft doesn't fix this is beyond me, as it is serious.


    • Proposed as answer by Alustiza Tuesday, March 27, 2018 1:22 AM
    • Edited by Alustiza Tuesday, March 27, 2018 1:22 AM Spelling
    Tuesday, March 27, 2018 1:21 AM
  • This resolved the issue with one of the report definition files I had the problem with but messed up a report definition file that was working.

    I tested these steps on report definition file Fuel Cost Summary Report 2. It corrected the problem but Fuel Cost Summary Report 6 started having the same problem.

    Months ago when Fuel Cost Summary Report 2 lost the data source and I could not get it corrected, I ended up creating several report definition files before I got one to retain the data source. That was Fuel Cost Summary Report 6 which started having the problem when I tested the steps above on Fuel Cost Summary Report 2.

    I restored Fuel Cost Summary Report 6 and the form that calls it from the most recent backup. This did not resolve the problem. I had to use the steps above to get Fuel Cost Summary Report 6 working again.

    Microsoft needs to figure this out.

    Saturday, March 31, 2018 1:15 AM
  • This resolved the issue with one of the report definition files I had the problem with but messed up a report definition file that was working.

    I tested these steps on report definition file Fuel Cost Summary Report 2. It corrected the problem but Fuel Cost Summary Report 6 started having the same problem.

    Months ago when Fuel Cost Summary Report 2 lost the data source and I could not get it corrected, I ended up creating several report definition files before I got one to retain the data source. That was Fuel Cost Summary Report 6 which started having the problem when I tested the steps above on Fuel Cost Summary Report 2.

    I restored Fuel Cost Summary Report 6 and the form that calls it from the most recent backup. This did not resolve the problem. I had to use the steps above to get Fuel Cost Summary Report 6 working again.

    Microsoft needs to figure this out.

    Perhaps but there is a different Forum for RDLC and reporting controls. So it seems to me you've posted, as the others did, in the wrong Forum.

    Please see - Visual Studio Report Controls


    La vida loca

    Saturday, March 31, 2018 2:11 AM