Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot open .rpt Crystal Reports file in Visual Studio 2010

Tags:

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?

like image 667
Stanley Avatar asked May 08 '12 14:05

Stanley


People also ask

How do I open an RPT file in Visual Studio 2010?

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.

How do I view a .RPT file?

Since most RPT files are saved in text format, most of the files can be opened using a text editor, such as Microsoft Notepad or Apple TextEdit. If the RPT file is saved in a proprietary format, you will most likely need to use the program that created the file to open it.

How do I edit a Crystal Report in Visual Studio 2010?

Solution 1 When Crystal Reports & Visual Studio with Crystal Reports is installed you will always get this option if you double-click a Report file. Instead open the application you want to edit the Report in & select File >> Open in Crystal Reports or File >> Open >> File in Visual Studio.


1 Answers

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.

like image 132
Dylan - INNO Software Avatar answered Oct 19 '22 00:10

Dylan - INNO Software