Problems deploying a WinForms app that uses Microsoft ReportViewer

后端 未结 6 1799
清酒与你
清酒与你 2021-02-15 12:41

I have published a WinForms application from Visual Studio 2010. It uses .NET 4.0. in the prerequisite dialog in Publish pane I selected .NET 4.0 Client Profile and Windows Inst

6条回答
  •  遥遥无期
    2021-02-15 13:18

    You have to deploy the ReportViewer controls separately.

    Check here on MSDN for more information: Deploying Reports and ReportViewer Controls

    The ReportViewer control redistributable is a self-extracting file named ReportViewer.exe that includes an .msi and other files. You can find ReportViewer.exe at the following location:

    %PROGRAMFILES%\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\ReportViewer\ReportViewer.exe
    

    You can also download it from the Microsoft Download Center.

    [ . . . ]

    The type of control you are using determines where ReportViewer.exe should be run.

    • For ASP.NET applications, run ReportViewer.exe on the Web server that hosts your application. This must be done by a server administrator.

    • For Windows Forms applications, include the controls as an application prerequisite so that they are installed automatically with your application. You can use the bootstrapping application to automate this step:

      • Open the project properties page.

      • Click Publish, and then click Prerequisites.

      • Select Microsoft Visual Studio 2010 Report Viewer, and then click OK.

      • Publish the application.

    During application installation, a check is performed on the local computer to see if ReportViewer is already installed. If it is not installed, the Setup program will install it.

提交回复
热议问题