1
votes

I have Visual Studio 2010 with SAP Crystal Report, but I cannot see the Crystal Report Viewer item in Visual Studio's Toolbox. How can I unhide, or add, that toolbox item?

2

2 Answers

0
votes

Go to Project/Properties and on Target Framework choose .NET Framework 4 on dropdown list.

0
votes

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