none
SSIS Script Task Error after adding Nuget Package Microsoft.ReportingServices.ReportViewerControl.WebForms RRS feed

  • Question

  • Hi Experts,

    I am trying to add Microsoft.ReportingServices.ReportViewerControl.WebForms 150.900.148 to use interface Microsoft.ReportViewer.Webforms to export SSRS 2016 Reports. But when saving the SSIS Package it gives error as shown ( I am using Visual Studio 2019 Community Edition ) although the Script Task compiles successfully without error.

    I tried using below version of packages also 

    microsoft.reportingservices.reportviewcontrol.webforms.140.1000.523.nupkg 
    microsoft.reportingservices.reportviewcontrol.webforms.preview.130.1700.305.nupkg

    while using version 13 and 14 does not gives error but in this case the debugger stops hitting the breakpoints i,e if i use version 13 or 14 the SCRIPT Task gets compiled successfully and SSIS Package gets saved but if i try to execute it with breakpoints inside the script task, it gets executed and gets failed due to some error but i cannot debug it as the break point i set do not get hit and even the debug window does not gets opened.

    If i remove the code using reportviewcontrol.webforms the Debugger starts working and it stops at breakpoints.

    Any help will be greatly appreciated

    P.S I am not sure to post this question in VS Forum or C# forum or SSIS Forum. So i request moderators to move this to relevant section if it is not proper section.

    Thanks

    Yuvraj 

    Friday, May 17, 2019 3:02 PM

All replies

  • Hi Yuvraj,

    Anything "Forms" or visual component is an oxymoron for SSIS, also the integration with Nuget is not desirable for SSIS projects.

    So in short, it supposed not to work.


    Arthur

    MyBlog


    Twitter

    • Proposed as answer by Yang.Z Monday, May 20, 2019 9:44 AM
    Friday, May 17, 2019 6:06 PM
    Moderator
  • Hi Arthur,

    Thanks for the reply.

    I am not using any visual components instead i am just using the methods inside microsoft.reportview.webforms to connect the SSRS Report Server and export the reports with C# code and this works perfectly in SQL Server 2008R2 so it should ideally work with SQL Server 2016 as i cannot find any reference on microsoft that it has been discontinued.

    Eg code in below url

    https://www.aspsnippets.com/Articles/Export-RDLC-Report-to-PDF-programmatically-in-ASPNet.aspx

    Thanks for the reply though.

    Thanks

    Yuvraj


    Friday, May 17, 2019 6:43 PM
  • Hi Yuvraj, 

    I believe Arthur is right, the error can be reproduced by adding a NuGet Package in Script Task. 

    It seems that you need to add reference to Microsoft.Reporting.WebForms in the Script. 

    You may need to install MICROSOFT® REPORT VIEWER 2015 RUNTIME


    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

    Monday, May 20, 2019 9:44 AM
  • Hi Yang,

    Thanks for the reply.

    I have already tried with MICROSOFT® REPORT VIEWER 2015 RUNTIME and other available versions. I believe this is a bug.

    I will check with installing Visual Studio 2017 and share if that works.

    Thanks

    Yuvraj

    Tuesday, May 21, 2019 1:42 PM
  • Hi Yuvraj, 

    Do you mean it's the same error message after installing REPORT VIEWER 2015 RUNTIME?

    According to my test in SSDT 2017, it seems to work well. 

    You can give it a try. 


    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 22, 2019 8:43 AM
  • Hi Yang,

    What i meant was, after installing REPORT VIEWER 2015 RUNTIME also i cannot find the report server assemblies when i try to find as shown in screenshot below 


    After installing REPORT VIEWER 2015 RUNTIME i can find microsoft.reportviewer.webforms in GAC as shown below

    so i add the assemblies from the GAC to the project, it compiles and runs but the debug window does not gets open even if i put breakpoints to debug the code even the debugger window does not get open. Just for reference the Operating System is Windows Server 2016  ,Database is SQL Server 2016 Developer, Visual Studio is 2017.

    Can you please below information

    1. Your testing environment details.

    2. From where did you add microsoft.reportviewer.webforms

    3. If you add microsoft.reportviewer.webforms in your project and use it to connect the SSRS 2016 Report Server and export any report and is it successful ?

    4. If you are able to connect the SSRS 2016 Report Server and export any report and if you apply a breakpoint than the debugger window gets opened or not ?

    Thanks

    Yuvraj

    Wednesday, May 22, 2019 9:42 AM
  • Hi Yuvraj, 

    --According to my test in SSDT 2017, it seems to work well. 

    I meant the Reference to the dll in GAC seems to be working, so does the Breakpoints. I didn't put any code in the Script Task, except "MessageBox.Show()". And I can't find the ReportViewer in Assemblies either. 

    If the code works well using MICROSOFT® REPORT VIEWER 2015 RUNTIME outside of SSIS, then you should also be able to copy it in to Script Task. 

    My test environment: Windows Server 2012, SSDT 15.9.0 



    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

    Thursday, May 23, 2019 2:59 AM
  • Hi Yuvraj,

    You are right. The Breakpoints will not be hit when the Target Server is changed to SQL Server 2016, it only works in SQL Server 2014. Maybe, you can debug the script in 2014, if you have to use the Breakpoints. 



    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

    Thursday, May 23, 2019 6:08 AM
  • Hi Yang,

    Thanks a lot for replying and taking time to answer.

    Just for update i tried Visual Studio 2017, 2019 and SSDT 2015 Version with different Nuget Versions 13,14,15 of Webforms but i cannot start debugger, it seems like there is an issue with the compatibility of DLL's and new .net framework.

    If anyone facing the same issue what i did was stopped using Webforms and instead consumed SSRS Web Service to export reports. Below link might help someone.

    http://geekswithblogs.net/stun/archive/2010/02/26/executing-reporting-services-web-service-from-asp-net-mvc-using-wcf-add-service-reference.aspx

    Thanks

    Yuvraj


    Thursday, May 30, 2019 6:04 AM