问题
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?
回答1:
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.
To do this right-click your project and select Properties. On the Application tab set the Target Framework dropdown.
回答2:
To fix the problem change it to .NET Framework version.
For VS 2012 versions just like mine this is how to Check the target framework of the project created.
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.
回答3:
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
After the Change Framwork You Need to install 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...
回答4:
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
Then you can see toolbox -->Reporting--> Report viewer . Its working
回答5:
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.
来源:https://stackoverflow.com/questions/11384420/crystal-report-viewer-doesnt-appear-in-toolbox-visual-studio-2010