C# Crystal 报表查看器未出现在工具箱中 - Visual Studio 2010
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11384420/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Crystal report viewer doesn't appear in toolbox - Visual Studio 2010
提问by MarcusV
I have a c# windows form application and after installing SAP Crystal Report for Visual Studio 2010 (http://www.businessobjects.com/jump/xi/crvs2010/default.asp) i cannot see Crystal Report Viewer in the toolbox. What am i doing wrong?
我有 ac# windows 窗体应用程序,在为 Visual Studio 2010 (http://www.businessobjects.com/jump/xi/crvs2010/default.asp) 安装 SAP Crystal Report 后,我在工具箱中看不到 Crystal Report Viewer。我究竟做错了什么?
回答by Ken Cenerelli
Check the target framework of the project you created. By default a new WinForms project gets set to .NET Framework 4 Client Profile.To fix your problem change it to .NET Framework 4.
检查您创建的项目的目标框架。默认情况下,新的 WinForms 项目设置为.NET Framework 4 Client Profile。要解决您的问题,请将其更改为.NET Framework 4。
To do this right-click your project and select Properties. On the Application tab set the Target Framework dropdown.
为此,请右键单击您的项目并选择“属性”。在应用程序选项卡上设置目标框架下拉列表。
回答by Myk Agustin
To fix the problem change it to .NET Framework version.
要解决此问题,请将其更改为 .NET Framework 版本。
For VS 2012 versions just like mine this is how to Check the target framework of the project created.
对于像我这样的 VS 2012 版本,这是如何检查创建的项目的目标框架。
To do this right-click project and select Properties. On the Compile tab, Click Advance Compile Options... and set the Target Framework dropdown to .NET Framework version.
为此,请右键单击项目并选择“属性”。在编译选项卡上,单击高级编译选项...并将目标框架下拉列表设置为 .NET Framework 版本。
回答by Chirag Suthar
You need to First Change Your Framwork to .net Framwork 4.0 Link http://www.aspsnippets.com/Articles/Crystal-Report-Viewer-missing-from-ToolBox-in-Visual-Studio-2010.aspx
您需要首先将您的框架更改为 .net 框架 4.0链接http://www.aspsnippets.com/Articles/Crystal-Report-Viewer-missing-from-ToolBox-in-Visual-Studio-2010.aspx
After the Change Framwork You Need to install Crystal Report Runtime http://scn.sap.com/docs/DOC-7824
更改框架后需要安装 Crystal Report Runtime http://scn.sap.com/docs/DOC-7824
You Can Also Create Crystal Report at Runtime...
您还可以在运行时创建水晶报表...
[In VB.Net]
Imports CrystalDecisions.Windows.Forms
Private Sub CrystalView_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim crv As New CrystalReportViewer
With crv
.Dock = DockStyle.Fill
End With
Me.Controls.Add(crv)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
[In C#]
using CrystalDecisions.Windows.Forms;
public class CrystalView
{
private void CrystalView_Load(System.Object sender, System.EventArgs e)
{
try {
CrystalReportViewer crv = new CrystalReportViewer();
crv.Dock = DockStyle.Fill;
crv.EnableDrillDown = false;
this.Controls.Add(crv);
} catch (Exception ex) {
MessageBox.Show(ex.Message,"Hello");
}
}
public CrystalView()
{
Load += CrystalView_Load;
}
}
in Your WinForm Crystal Report Viewer is Visible...
在您的 WinForm 水晶报表查看器中是可见的...
回答by Niya
You just install the complete package through this link.If you already installed any crystal report packages,jus unistall them first n download the complete package throgh this link n install it.
您只需通过此链接安装完整包。如果您已经安装了任何水晶报告包,请先卸载它们,然后通过此链接下载完整包并安装它。
http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_5.exe
http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_13_0_5.exe
Then you can see toolbox -->Reporting--> Report viewer . Its working
然后你可以看到 toolbox -->Reporting--> Report viewer 。它的工作
回答by Chenthil
After installing crystal reports,if its not shown in reports in tool box,right click the Reporting in Toolbox and select Choose items,It will open up a window.In that window choose .NET Framework components,it will refresh list,check list the needed CrystalReportSource,CrystalReportSource etc.Now you can see the crystal reports tools in toolbox under Reporting Menu.
安装水晶报表后,如果工具箱的报表中没有显示,在工具箱中的报表上右击,选择选择项,会弹出一个窗口。在该窗口中选择.NET Framework组件,会刷新列表,勾选需要CrystalReportSource,CrystalReportSource等。现在您可以在Reporting Menu下的工具箱中看到Crystal Reports工具。


