Hello,
I have just upgraded my VS2003 project to VS2005. Had a million things to fix, but I'm finally down to the last few.
The biggest remaining problem is my Crystal Reports don't work.
The error message is below... On googling it the answer seems to be I have to include the *.rpt's as an embedded resource. However, and this is the really odd bit, the properties that should show up in VS2005 to allow me to do that are simply missing! No matter how I fool around with it, there is no Build Action property when I select a file in the Solution Explorer. I notice that if I create a Windows application in VS, the Build Action property (and 3 others in the Advanced category) are available. Just not when I'm working with web projects.
Any ideas
Unable to find the report in the manifest resources.
Please build the project, and try again.
...
Exception Details: CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Unable to find the report in the manifest resources. Please build the project, and try again.
Source Error:
Line 191: strReport_Title = ds.Tables(0).Rows(0).Item("Session_Name").ToString
Line 192: Dim oRpt As rptLesson_Allocation = New rptLesson_Allocation
Line 193: oRpt.SummaryInfo.ReportTitle = u.GetResourceString(1103, "Lesson Allocation") & _
" : " & strReport_Title
Thanks!
Mike

'Unable to find the report in the manifest resources' - Build Action is missing??!
Videojumper
Did you need to upgrade to Crystal Reports XI Release 2 Is this what you guys also did
Some literature specifies you need to upgrade to this version for CR to work correctly in 2005. I had a few problems when upgrading to Release 2 and couldn't get this to work.
I used your solution specified here and I get an error when trying to export reports. Investigations into this suggest upgrading to R2.
http://forums.microsoft.com/msdn/showpost.aspx postid=17326&siteid=1
Any replies would be appreciated
thanks
Moses Kingsbury
Ok, problem solved. I deleted the wrapper classes that had been created during the upgrade process, and modifed my code as follows:
The old code:
Dim oRpt As rptLesson_Allocation = New rptLesson_Allocation
The new code:
oRpt.Load(Server.MapPath(
"reports/rptLesson_Allocation.rpt"))And everything is working again. Yayayayayay!
Limitx
I am still getting the error... can anyone help
Note that this project was upgraded from VS2003 to VS2005, and is a web project.
This article:
http://support.businessobjects.com/documentation/product_guides/cr_net/vs_2005/html/crconsdkfundamentalsembeddedornonembedded.htm
says:
"In Visual Studio 2005, Crystal Reports report files are no longer embedded in Web projects; therefore, no report wrapper class is generated."
BUT! My reports all have wrapper classes that were created during the upgrade. Does this mean I should delete the wrappers and change my code to no refer to the files instead of the classes Can someone advise please
Thanks,
Mike
Shells
Iskander
Hello
I followed the same thing and my application runs.
However, when i want to create a new application with embedded reports no wrapper class is created.
Do suggest me as what to do in this regard.
Regards,
Aneela
Jetpac1
Just the info I needed as I was in the same boat after a conversion. Thanks.
BTW, I had to add one more line before your new code line to make it work
Dim oRpt As New ReportDocument
Cheers,
DW
WDK_Kernel
CrystalDecisions.CrystalReports.Engine.
ReportClass oRpt = new CrystalDecisions.CrystalReports.Engine.ReportClass(); string URL = Server.MapPath("MyReport.rpt");oRpt.FileName = URL;
oRpt.Load();
Load(URL) was giving me a; "String reference not set to an instance of a String." exception. in VS2005 with Crystal Reports for Visual Studio 2005
This way works!
I also added a virtual directory for the viewer; which was rumored to cause an object reference exception: CrystalReportWebFormViewer3 "C:\Inetpub\wwwroot\aspnet_client\system_web\2_0_50727\CrystalReportWebFormViewer3"
Mark Austin -
hullracing
The error I have was a "Loadsavereportexception". After reading all the replies about this error, I tried a number of fixes. The error turned out that the default namespace in the project properties has a wrong value. The value occured when using the project as a source to create another project. I was just copying code. After I changed the default namespace in the properties, Crystal Reports worked correctly again.
jeff.adams86
Thanks for the solution, I had a similar problem. Embedding reports can make the executable file size much larger.
Here's what I did.
Changed the Build Action from 'Embedded Resource' to 'Content'.
Deleted the old wrapper class.
Changed code to load report.
Dim
report As New ReportDocumentreport.Load(reportFilePath)
Joshizzle
Hi,
try to rename your report to "MyReport2.rpt" and build the project and back to old name, it works for me.