4

I have vs2017 my colleague has vs2015, he installed report viewer by vs studio installer. we are working on same project when he creates new report(.rdlc) file, his report schema defination url is like;

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

So do mine, but when I add parameter from toolbox, it changes to below magicly;

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

Yeah I understood my external report viewer version is diffirent from vs integrated, its all behind this.

if I remove some unnecessary tags that I awere of via this post it works, but If I add any param or change the position of existing paremeter 2016 stuff comes in with its xml elements back. So I need to tell VS

"Forget 2016. please continue using 2008 version"

Edited: They say "you should set to the correct Target Server Version". What does and how can I do this please elaborate the steps of this action?

removing vs 2017 and install vs2015 looks like certain solution but I dont want to chnage my ide just because of few unnecessary xml elements.

Community
  • 1
  • 1
TyForHelpDude
  • 4,828
  • 10
  • 48
  • 96

3 Answers3

3

You need to change the TargetServerVersion to SQL Server 2008. This can be found in the Properties of you Visual Studio Project on the General tab.

Thomas
  • 56
  • 2
1

There is a workaround. If you remove all the parameters directly in the xml you can change anything in the report viewer that it wont update to 2016. Do everything that you need to do and add the parameters back directly in the xml as your last step.

Heres an example how to add parameter in the xml

<ReportParameters>
 <ReportParameter Name="YourParamName">
  <DataType>Integer</DataType>
  <Prompt>ReportParameter1</Prompt>
 </ReportParameter>
</ReportParameters>
CPJ
  • 128
  • 2
  • 6
0

I had the same problem and well, I didn't can changue the TargetServerVersion, I just installed Microsoft.ReportingServices.ReportViewerControl.WebForms from Nugget and it solved my problem. Hopefully it can work for you

  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/31425480) – pat8719 Apr 02 '22 at 19:54