SAP Knowledge Base Article - Public

1202102 - Crystal Reports Winform Viewer click events in Microsoft Visual Studio .NET


Crystal Reports Winform Viewer click events in Microsoft Visual Studio .NET.


ClickPage and DoubleClickPage events have been added to the Crystal Reports Winform Viewer"s events. These events also have added an ObjectInfo class that allows you to retrieve properties of the object on the viewer that was clicked. These events are only available in Crystal Reports XI Release 2 and above.
Properties that are accessible from the ObjectInfoClass are:
Gives the datacontext information of the field that was clicked.
Gives the full groupnamepath of the field that was clicked.
Returns the Object type (ie Chart, DatabaseField, DetailSection etc.).
The Name of the report object clicked.
The value of the report object clicked.
The tooltip text of the object clicked.
The Hyperlink information of the object clicked.


C# sample code:

namespace CRXIR2_VS2005_GetReportObjectClicked
    public partial class Form1 : Form
        ReportDocument crReport;

        public Form1()

            // Create an instance of the report
            crReport = new CrystalReport1();

            crystalReportViewer1.ReportSource = crReport;

                // Ensure you are using CR XI Release 2 and at minimum BusinessObjects XI Release 2 Service Pack 1 (SP1)
                // and BusinessObjects XI Release 2 Monthly Hot Fix 1 (MHF1)

        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
            if (e.ObjectInfo.Text != null)
                msg += "... Text: " + e.ObjectInfo.Text.ToString();

            // Display the collected information in a message box.

         private void crystalReportViewer1_Load(object sender, EventArgs e)



events viewer windows net ClickPage DoubleClickPage ObjectInfo class , 5249694 , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , How To


SAP Crystal Reports, developer version for Microsoft Visual Studio ; SAP Crystal Reports, version for Visual Studio .NET 2008