24

I have taken over an existing C# project and am using Visual Studio 2010 with .NET framework 4.0.

The application uses Crystal Reports. It seems like the definitions of the reports lie in a separately located folder containing many .rpt files.

When I run the application, some of these reports work and others don't. I now want to debug the reports that don't work and also want to add some new Crystal Reports.

Problem is, whenever I try to open one of the .rpt files in Visual Studio I get gibberish - it looks like binary code.

For information: I already know that Crystal Reports does not come standard with Visual Studio 2010. I have therefore already installed SAP Crystal Reports, version for Visual Studio 2010 - Click Once (64 Bit) from the location http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp as was suggested in Creating a Crystal Reports rpt file using Visual Studio 2010 and http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/fb6d3588-1481-46a2-8284-90dbb40c42f6

Did I install the wrong thing or am I missing a dependency? The .rpt files are not part of the Visual Studio project. They are separate files in a folder. How do I go about opening them so that I can perform edits in Visual Studio?

5 Answers 5

12

I suspect the file-type association for .RPT is broken. You may have tried opening the .RPT before you had Crystal Reports installed and accidentally selected something else to open it. Now it probably automatically opens them incorrectly.

This article describes changes between Windows versions and how to edit them: http://www.technize.com/advanced-file-types-association-in-windows-7/

That said, there is a quicker easier way to do a quick test to confirm if those .RPT files are valid.

In Visual Studio, inside your C# project, do an 'Add New Item > Reporting > Crystal Reports' and it will start a wizard for adding reports to your project. When this happens, you'll be prompted to 'create a new report' or to 'open from existing file'. Choose open existing and browse to your .RPT file. This should force Crystal Reports to attempt to open this file in the Visual Studio based Crystal Report designer.

Best of luck with it.

4
  • 1
    Thanks. I doubt if it's a file association problem as I get the problem even when I directly open the file from Visual Studio. I have followed your test by adding new Crystal Reporting item to the project. That just created a CrystalReport1.mht file in my project and brought up a SAP page saying that I should download and install Crystal Reports for Visual Studio. It links back here: businessobjects.com/jump/xi/crvs2010/us2_default.asp My problem still persists. I HAVE installed SAP Crystal Reports, version for Visual Studio 2010 - Click Once (64 Bit) What else needs to be done?
    – Stanley
    Commented May 9, 2012 at 5:30
  • 16
    Ah-hah, that's the problem. You've installed the RUNTIME that supports Crystal Reports when you go to deploy your solution to a 64-bit web server. You need to actually install the Crystal Reports for Visual Studio 2010: downloads.businessobjects.com/akdlm/cr4vs2010/… Commented May 9, 2012 at 5:39
  • 1
    Downloaded and installed SAP Crystal Reports, version for Visual Studio 2010 - Standard and suddenly it works! Thanks! The descriptions on the download page are really bad - difficult to see the difference between downloads and I'm on a slow line so didn't try all options.
    – Stanley
    Commented May 9, 2012 at 6:07
  • You're welcome. It helps that in a former life I worked as a Resource and Virtual Elite in the .NET SDK team that supported the Enterprise customers of Crystal Reports. :) I'm used to wading through a sea of downloads and deployment packages. Commented May 9, 2012 at 6:18
10

For development, you need to install SAP Crystal Reports, version for Visual Studio 2010 - Standard from the download page you linked to.

The Click Once version that you installed is for deployment.

2

According to information from: http://scn.sap.com/docs/DOC-7824

Note 1: To integrate "SAP Crystal Reports, developer version for Microsoft Visual Studio" you must run the Install Executable. Running the MSI will not fully integrate Crystal Reports into VS.MSI files by definition are for runtime distribution only. By default Windows 10 does not install the 3.5 framework, CR for VS still needs it. Select it by "Turn Windows feature on or off" and choose both options.

Note 2: SAP Crystal Reports, Developer Version for Visual Studio .NET does NOT support Express Editions of any version of Visual Studio .NET.

1

Problem: On a 64-bit machine with Visual Studio 2010, I had installed the 32-bit version of CRforVS.

Solution: I needed to install the 64-bit version of CRforVS.

That's funny, because as far as I know, all versions of Visual Studio are 32-bit.

0

I have had similar instances on a 64-bit machine, where I designed the crystal reports in a given User Profile, and When I changed to another User Profile on the same Computer, Crystal Reports Seemed to be broken.

Solution: I solved this by re-installing Crystal Reports for vs2010 (64-bit) on the other User Profile also. Looks like when you install CR on a computer with many User Profiles, you may want to select Install for Everyone, instead of just me.

Not the answer you're looking for? Browse other questions tagged or ask your own question.