Cannot open the report in report designer

Anjali Agarwal 1,426 Reputation points
2023-10-26T05:06:46.0533333+00:00

I am trying to open a report in Visual studio 2019. This report was originally created in Visual studio 2017. When I tried top open the report, I got below error:

User's image

when I click cancel, it opens the file in XMl and when I click Ok, it converts the file and opens the file in Report designer, but when I start running the application and want to see the report, I get this error:

ReportProcessingException: The definition of this report is not valid or supported by this version of Reporting Services. The report definition may have been created with a later version of Reporting Services, or contain content that is not well-formed or not valid based on Reporting Services schemas. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition' which cannot be upgraded.

This error comes at this line of code:

 rptViewer.LocalReport.SetParameters(new ReportParameter[] { startDateParam, endDateParam });

I have been struggling with this issue for several hours, but could not resolve this. Any help on this will be highly appreciated. I have these two dll present in the bin directory:

Microsoft.ReportViewer.Common

Microsoft.ReportViewer.WebForms

The version for both of them is 12.0.0.0

any help on this will be highly appreciated.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,794 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. AniyaTang-MSFT 12,446 Reputation points Microsoft Vendor
    2023-10-26T05:46:22.5133333+00:00

    Hi @Anjali Agarwal

    This error occurs when a report's schema has been upgraded to the latest version and you try to publish it to an older server, you can set the target server version in the deployment properties to help resolve this issue.

    For more details, you can refer to this link: https://askgarth.com/blog/how-to-fix-the-ssrs-error-definition-of-this-report-is-not-valid/.

    If the answer is helpful, please click Accept Answer and Up-Vote for the same. If you have any questions, please feel free to let me know.

    Best regards,

    Aniya


  2. Anjali Agarwal 1,426 Reputation points
    2023-10-26T06:16:36.3233333+00:00

    This link helped me to fix the report. I am posting the link so that other can get help with this:

    https://stackoverflow.com/questions/52087382/downgrade-ssrs-from-2016-to-2008

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.