水晶决策应用项目 [英] Crystal decision app project
问题描述
大家好,
我正在使用C#和sql server数据库开发Windows应用程序。我已经进入了我的发展的最后一步,我必须包括报告。因此,当我在我的机器中尝试水晶报告时它的问题很完美,并显示所需的结果,但是当我发布应用程序并在客户端计算机中使用它时,它会触发此错误:
Hello everyone,
I am developping a windows application using C# and a sql server data base. I have come to the last step of my developpement, where I have to include reports. So the problem in when I try the crystal report in my machine it works perfectly, and displays the results wanted, but when I publish the app an employ it in the client machine, it triggers this error :
CrystalDecision.CrystalReports.Engine.ReportDocument.cctor()
我添加了这个dll:
CrystalDecision.crystalReport.engine;
CrystalDecision.ReportSource;
CrystalDecision.shared;
CrystalDecision.Windows.Forms;
CrystalDecision.web;
Microsoft.reportViewer.Common;
Microsoft.ReportViewer.WebForm / WinForms;
使用此代码来报告
I have added this dlls :
CrystalDecision.crystalReport.engine;
CrystalDecision.ReportSource;
CrystalDecision.shared;
CrystalDecision.Windows.Forms;
CrystalDecision.web;
Microsoft.reportViewer.Common;
Microsoft.ReportViewer.WebForm/WinForms;
And using this code to call the report
ReportDocument cr = new ReportDocument();
cr.Load(Path.Combine(Application.ExecutablePath, "REPORT", "horsEtude.rpt"));
cr.SetDataSource(o.dt);
crystalReportViewer1.ReportSource = cr;
crystalReportViewer1.Refresh();
REPORT文件夹位于BIN / DEBUG文件夹中
我已将copyLocals更改为True
我的DLL版本为13.0.2000.0并且我使用的是Visual stuio 2010
我已经尝试了一百万个解决方案,但仍然触发了异常
我还安装了Microsoft ReportViewer 2010 Redistibuable和Microsoft .NET 4.6
客户机中的框架
我使用的发布方法是创建一个安装项目,我添加现有项目,我是一个项目输出,我构建解决方案并复制设置来自ebug文件夹的.exe。
我需要你的帮助,我已经在网上尝试了所有可能的教程,但仍然没有机会。
我希望我能清楚地解释这个问题。谢谢
我尝试了什么:
整个百万教程web
the REPORT folder is in the BIN/DEBUG folder
I have changed copyLocals to True
the version of my DLLs is 13.0.2000.0 and I am using Visual stuio 2010
I have tried a million solution, but still triggers that exception
I also instal Microsoft ReportViewer 2010 Redistibuable and Microsoft .NET 4.6
Framework in the client machine
The publish method that I use is that I create a Setup Project, I add my existing project, and I a a project output, I build the solution and copy the setup.exe from the ebug folder.
Please I need your HELP, I have tried every possible tutorial on the web, but still no chance.
I hope I explained the issue clearly. Thank you
What I have tried:
A million tutorials throughout the web
推荐答案
我还安装了Microsoft ReportViewer 2010 Redistibuable和Microsoft .NET 4.6
客户机中的框架
I also installe Microsoft ReportViewer 2010 Redistibuable and Microsoft .NET 4.6
Framework in the client machine
你在客户端机器上安装了水晶运行时吗?
CRforVS_redist_install_32bit_13_0_8或CRforVS_redist_install_64bit_13_0_8
did you install crystal runtime on the client machine?
CRforVS_redist_install_32bit_13_0_8 or CRforVS_redist_install_64bit_13_0_8
在收到你的评论之后,我已将它安装在我客户的机器上,错误消失了你真是太棒了!
但它显示此错误
After reaing your comment, I have installed it in my client's machine, the error has gone you are so amazing !
But it shows this error
failure of the report loading
正如我已经说过的,我的.rpt文件位于bin / Debug / REPORT文件中。所以现在我猜错误来自于无法找到我的Rpt文件的位置。
我感谢您的帮助,非常感谢
As I already said, my .rpt file is in the bin/Debug/REPORT file. So I guess now that the error comes from not being able to find where my Rpt file is.
I appreciate your Help, thank you so much
这篇关于水晶决策应用项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!