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

查看:13
本文介绍了无法在清单资源中找到报告 - 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..

推荐答案

经过大量谷歌搜索后,CR 出现很多问题,其中一个修复程序将解决问题.

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 属性设置为 Embedded Resource

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天全站免登陆