【问题标题】:Crystal Reports on click get content水晶报表点击获取内容
【发布时间】:2017-10-25 20:52:23
【问题描述】:

我正在使用 Visual Studio 2015 和 Crystal Reports 2013(版本 14.1.4.1327)。在 CrystalReportViewer 上,当我单击 TextObject 或报告上的任何其他内容时,有没有办法获取部分名称或单击内容的值?

谢谢!

【问题讨论】:

    标签: c# visual-studio crystal-reports


    【解决方案1】:
    private void crystalReportViewer1_ClickPage(object sender, CrystalDecisions.Windows.Forms.PageMouseEventArgs e)
                {
                    // Collect the report object name and type.
                    string msg = "Report Object: " + e.ObjectInfo.Name.ToString()
                        + " (" + e.ObjectInfo.ObjectType.ToString() + ")";
    
                    // Some report objects won't have text properties; verify that the property isn't null 
                    // before attempting to access it.
                    if (e.ObjectInfo.Text != null)
                    {
                        msg += "... Text: " + e.ObjectInfo.Text.ToString();
                    }
    
                    // Display the collected information in a message box.
                    MessageBox.Show(msg);
                }
    

    在这里找到答案:https://archive.sap.com/discussions/thread/1073492

    但是,这不适用于子报表。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-11-30
      • 1970-01-01
      • 1970-01-01
      • 2012-04-18
      • 1970-01-01
      • 2020-06-05
      • 2010-10-08
      相关资源
      最近更新 更多