Crystal report viewer doesn't appear in toolbo

2019-05-04 06:42发布

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?

5条回答
Animai°情兽
2楼-- · 2019-05-04 07:22

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...

查看更多
淡お忘
3楼-- · 2019-05-04 07:31

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.

enter image description here

查看更多
劫难
4楼-- · 2019-05-04 07:32

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.

查看更多
兄弟一词,经得起流年.
5楼-- · 2019-05-04 07:36

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

查看更多
爷的心禁止访问
6楼-- · 2019-05-04 07:38

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.

查看更多
登录 后发表回答