Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to find the report in the manifest resources - Crystal Report / C#

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;

I am receiving following error: Unable to find the report in the manifest resources. Please build the project, and try again.

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

like image 588
Waqas Avatar asked Dec 10 '10 11:12

Waqas


2 Answers

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

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) Make sure the build property of the rtp file is set to Embedded Resource

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

like image 52
Tich -- Lil3p Avatar answered Nov 15 '22 09:11

Tich -- Lil3p


Well... I had the same problem. My solution was to edit the properties of the Report, and change the Custom Name Space.

Lets say that I was caling the report from Name Space "A", and my report was in the same Tool Name Space but in other DLL.

So, I've cleared the Custom Name Space... and rebuilt everything.

Problem solved for me.

like image 45
user1768874 Avatar answered Nov 15 '22 08:11

user1768874