Click here to Skip to main content
15,886,059 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
I have a windows forms project that I originally created using visual studio 2008. I decided to upgrade it to visual studio 2010. My project includes several crystal reports (also created with visual studio 2008). I installed vs2010, created a new project, and added the forms and crystal reports from the vs2008 version. When I tried to compile my project I was informed that crystal reports was not automatically installed with vs2010. So I installed crystal reports for 2010. At some point I opened a crystal report in the designer of vs2010 to make sure it showed up and to prove to myself that I had indeed installed the crystal reports for 2010. It opened fine and when I closed the report again I was prompted: Did I want to save the report to the newer version of crystal reports? I said yes, figuring it would be best to just upgrade it all now instead of having some reports as old version and some as new versions later.

Now, when I get to the code that actually creates the report, I get an error. Even worse, it's the kind of error that won't even let me debug:
[MyProgramName].vshost.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
And then it has stuff about sending an error report, etc.

The line of code that it blows on is:
VB
reportDocument1.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, instrFile)

(I never actually display a crystal report in a viewer. I always just convert it to a PDF to show to my users. So this code statement is where the report is actually being created. I already set the data source and login stuff.)

Has anyone converted a vs2008 crystal report to vs2010? I have a feeling I'm just missing some step but I'm not able to find much information on my exact scenario via google. Does anyone have an idea for me?
Posted

I finally figured it out. Turns out a couple of my reports still worked after the conversion from crystal 2008 to 2010. I finally realized that those reports were ones that did not have logos on them. It appears that Crystal Reports 2010 does not like the TIF file format, even though I was able to use it in 2008. I converted my logos to JPG and it works just fine. I really wish there had been a nicer error message for this to save me some trouble.
 
Share this answer
 
Comments
thatraja 26-Jan-12 4:59am    
My 5! for your answer to your question
nikolaborcic 18-Oct-15 10:24am    
smooth.. never thought that could be the issue
You can check it out


http://forums.sdn.sap.com/forum.jspa?forumID=313&start=0
 
Share this answer
 
Comments
Kschuler 26-Jan-12 9:25am    
Is there a specific thread on there about my issue? Because I had searched there already but couldn't find anything to help me. Maybe I wasn't searching for the right key words... Or were you just letting me know that the forum existed?
i am also getting the same error.
It says "MyApplication mfc application has encountered a problem and needs to close. We are sorry for inconvience."
and my reports does'nt even contain logos.
plz suggest for possible solutions for such kind of errors.
 
Share this answer
 
Comments
Kschuler 19-Sep-12 9:21am    
If my solution didn't work for you, you should probably post yours as a separate question. If you don't have an images you could check for unique fonts or perhaps you have some different formula code? Check any kind of special feature like if you are using grouping or parms or things like that.
SidProgrammer 20-Sep-12 1:05am    
could hav posted as a seperate question...bt i thought this link is very relevant to my problem...
ok...thank u 4 ur inputs
If you are having an issue with Photoshop CS5 tiff's and vs2010 SAP crystal reports...TRY THIS FIRST!!! Hopefully it will save you the 12 hours I have into it.

I had the same situation; reports crashes with generic error message. All of this happened to me after I updated crystal to vs2010. From what I can tell, the combination of vs2010 and Photoshop CS5 don't mix (for .tif images). Possibly other version combinations have the same issue.

My resolution: I create my tiff image in photoshop and save as a nice printable hi-resolution tif file. Then I 1) open that tif file in Microsoft Paint, and 2) Save As > Other Formats > Type as another tif file. After these steps, when I run the report and load the image at run-time, it generates the report.

Paint does change the file size so the file is different.

I must say that this was the most painful update I have ever done (this was not the only SAP Crystal reports update issue - useLegacyV2RuntimeActivationPolicy was another day and a half trying to solve).

<sarcasm>I'm so looking forward to the next SAP update!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900