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..
My issue was that the directory's name where my reports was located was all numbers in order to correspond to the client codes we use. So what happened was that Visual Studio named the class
Reports._1234567
, while my directory was "\Reports\1234567". When I renamed the folder "_1234567" then the folder matched the class name and everything worked fine.In the report's code behind the
FullResourceName
property is this:The underscore character was added by VS because you can't have a class name that does not start with a letter or underscore.
I received the same "Unable to find the report in the manifest resources" error in VS 2010 after manually copying *.rpt and *.vb files into a different solution's directory.
After checking the embedded resource setting everyone speaks about in this post (it was already set to embedded resource),
I solved the problem by right-clicking the .rpt file in Solution Explorer and selected "Run Custom Tool".