C# 无法在客户端计算机上运行crystal report

C# 无法在客户端计算机上运行crystal report,c#,.net,visual-studio-2010,crystal-reports,crystal-reports-2010,C#,.net,Visual Studio 2010,Crystal Reports,Crystal Reports 2010,我在vs2010中创建了一个项目,然后我创建了一个安装项目n deployed。当我在我的PC上运行应用程序时,它显然运行得很好,但对于客户机,应用程序运行得很好,除了crystal reports。 我创建了安装项目,然后添加了先决条件 Microsoft .Net framework 4 Client Profile (x86 and x64) SQL server 2008 express windows installer 3.1 已选择>从与我的应用程序相同的位置下载先决条件>确

我在
vs2010
中创建了一个项目,然后我创建了一个安装项目n deployed。当我在我的PC上运行应用程序时,它显然运行得很好,但对于客户机,应用程序运行得很好,除了crystal reports。 我创建了安装项目,然后添加了先决条件

Microsoft .Net framework 4 Client Profile (x86 and x64)
 SQL server 2008 express
 windows installer 3.1
已选择>从与我的应用程序相同的位置下载先决条件>确定

这样,当我构建项目时,它是成功的,并且应用程序运行良好,但在客户端机器上没有crytal report。因此,我尝试添加必要的SAP crystal Report Runtime Engine for.Net framework 4.0>ok

然后显示了建筑安装项目中的4个错误,分别是:

Error   5   To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'Crystal Reports for .NET Framework 4.0\CRRuntime_32bit_13_0.msi' for item 'SAP Crystal Reports Runtime Engine for .NET Framework 4.0' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=239883.

Error   7   General failure building bootstrapper   

Error   6   To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'Crystal Reports for .NET Framework 4.0\CRRuntime_64bit_13_0.msi' for item 'SAP Crystal Reports Runtime Engine for .NET Framework 4.0' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=239883.

Error   8   Unrecoverable build error.

我尝试在客户端PC上安装.NET framework 4.0的CR runtime,但出现错误,即
首先安装vs2010以安装CR runtime
。vs2010不应安装在客户端PC上,我不知道如何修复它,问题出在哪里,crystal reports在我的PC上运行良好,请帮助我在客户端PC上运行它。提前谢谢。

我不知怎么解决了它,我更改了所有报告
.rpt
文件的
属性,将
buildaction
Embedded Resource
设置为
Content
,然后将我报告的所有
.rpt
.cs
文件复制到同一个
setup
文件夹中,这样它也可以在客户端计算机上正常运行。

无需放置
.cs
文件。您只需要放入
.rpt
文件。是的,但不需要来自project。您需要将其从安装项目中删除。简而言之,文件生成后不需要.cs文件。应用程序只需要已发布的.rpt文件。