【问题标题】:How to unhide Crystal Report Viewer in Visual Studio 2010's toolbox?如何在 Visual Studio 2010 的工具箱中取消隐藏 Crystal Report Viewer?
【发布时间】:2012-08-24 22:50:42
【问题描述】:

我有带有 SAP Crystal Report 的 Visual Studio 2010,但我看不到 Crystal Report Viewer 项 Visual Studio 的工具箱。如何取消隐藏或添加该工具箱项?

【问题讨论】:

标签: visual-studio-2010 crystal-reports toolbox


【解决方案1】:

转到 Project/Properties 并在 Target Framework 上的下拉列表中选择 .NET Framework 4。

【讨论】:

    【解决方案2】:

    您需要先将您的 Framwork 更改为 .net Framwork 4.0 链接http://www.aspsnippets.com/Articles/Crystal-Report-Viewer-missing-from-ToolBox-in-Visual-Studio-2010.aspx
    您还可以在运行时创建 Crystal Report...

    [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;
        }
    }
    

    在您的 WinForm Crystal Report Viewer 中可见...

    【讨论】:

      猜你喜欢
      • 2012-06-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多