无法在清单资源中找到报表 - Crystal Report / C# [英] Unable to find the report in the manifest resources - Crystal Report / C#

查看:748
本文介绍了无法在清单资源中找到报表 - Crystal Report / C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用C#编写的Windows应用程序,并且试图使用水晶报表查看器显示水晶报表。我的报告的名称是receiptReport,我使用以下行在查看器中显示报告:

I have a windows application written in C# and am trying to display crystal report using crystal report viewer. The name of my report is "receiptReport" and I am using following line to show report in viewer:

receiptReport rpt = new receiptReport();
crystalReportViewer.ReportSource = rpt;

我收到以下错误:在清单资源中找不到报表。请创建项目,然后重试。

我已经尝试通过设置报告文件receiptReport.rpt仍然现在运气..我使用VS2010 ..

I have tried by setting Build Action of report file 'receiptReport.rpt' to Embedded Resource but still now luck.. Im using VS2010..

推荐答案

很多事情出了问题,这些修复会解决问题。

A lot of things go wrong with CR after a lot of googling one of these fixes will solve the problem.

1)如果包含的文件夹中有空格,报告代码文件(.cs)中的Full FullResourceName属性将是错误的。名称。最好的解决方法是重命名文件夹以删除空格,如果您手动编辑代码文件,错误将继续回来

1) Full FullResourceName property in the reports code file (.cs) will be wrong if the containing folder(s) has spaces in its name. The best fix is to rename the folder to remove spaces if you manually edit the code file the error will keep coming back

2)确保rtp文件的build属性设置为嵌入资源

2) Make sure the build property of the rtp file is set to Embedded Resource

3)使用Developer Express进行报告并避免所有的头痛。

3) Use Developer Express for reporting and avoid all headaches in the first place

这篇关于无法在清单资源中找到报表 - Crystal Report / C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆