无法在 Visual Studio 2010 中打开 .rpt Crystal Reports 文件 [英] Cannot open .rpt Crystal Reports file in Visual Studio 2010

查看:35
本文介绍了无法在 Visual Studio 2010 中打开 .rpt Crystal Reports 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经接管了一个现有的 C# 项目,并且正在使用带有 .NET 框架 4.0 的 Visual Studio 2010.

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

应用程序使用 Crystal Reports.报告的定义似乎位于包含许多 .rpt 文件的单独文件夹中.

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

当我运行应用程序时,其中一些报告有效,而另一些则无效.我现在想调试不起作用的报表,还想添加一些新的 Crystal Reports.

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.

问题是,每当我尝试在 Visual Studio 中打开其中一个 .rpt 文件时,都会出现乱码 - 它看起来像二进制代码.

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

有关信息:我已经知道 Crystal Reports 不是 Visual Studio 2010 的标准配置.因此,我已经从 SAP Crystal Reports,Visual Studio 2010 版本 - 单击一次(64 位)"http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp" rel="nofollow noreferrer">http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp使用创建 Crystal Reports rpt 文件中的建议Visual Studio 2010http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/fb6d3588-1481-46a2-8284-90dbb40c42f6

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

是我安装了错误的东西还是缺少依赖项?.rpt 文件不是 Visual Studio 项目的一部分.它们是文件夹中的单独文件.如何打开它们以便在 Visual Studio 中执行编辑?

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?

推荐答案

我怀疑 .RPT 的文件类型关联已损坏.您可能在安装 Crystal Reports 之前尝试打开 .RPT,但不小心选择了其他东西来打开它.现在它可能会自动错误地打开它们.

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.

本文介绍了 Windows 版本之间的更改以及如何编辑它们:http://www.technize.com/advanced-file-types-association-in-windows-7/

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

也就是说,有一种更快更简单的方法来进行快速测试,以确认这些 .RPT 文件是否有效.

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

在 Visual Studio 中,在您的 C# 项目中,执行添加新项目 > 报告 > Crystal Reports",它将启动一个向导,用于将报告添加到您的项目中.发生这种情况时,系统会提示您创建新报告"或从现有文件打开".选择打开现有并浏览到您的 .RPT 文件.这将强制 Crystal Reports 尝试在基于 Visual Studio 的 Crystal Report 设计器中打开此文件.

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.

祝你好运.

这篇关于无法在 Visual Studio 2010 中打开 .rpt Crystal Reports 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆