SAP Knowledge Base Article - Public

1306320 - How to add a tooltip to a report using the Crystal Reports .NET inproc RAS SDK


How to add a tooltip to a report using the Crystal Reports .NET inproc RAS SDK ?

Reproducing the Issue

  • Crystal Reports XI Release 2 Service Pack 2 and later 
  • C#
  • Resolution

    sample code:

               using CrystalDecisions.CrystalReports.Engine;
               using CrystalDecisions.ReportAppServer.ClientDoc;

                //CR Declarations
                ReportDocument                                                                                                        m_boReportDocument;
                ISCDReportClientDocument                                                                                    m_boReportClientDocument;
               CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject                    m_boReportObject;
               CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject                    m_boReportObjectModified;

                //create a new ReportDocument
                m_boReportDocument = new ReportDocument();

                //load the RPT file

                //access the ReportClientDocument in the ReportDocument (EROM bridge)
                m_boReportClientDocument = m_boReportDocument.ReportClientDocument;

                //get the first report object in the first details section
                m_boReportObject = (CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject)  _

                //make a copy of the report object that we will modify
                m_boReportObjectModified = (CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject) m_boReportObject.Clone(true);

                //add the text you want as the tool tip
                m_boReportObjectModified.Format.ToolTipText = "Tool Tip added";

                //modify the object - we don't use add here because we are modifying an existing object
                m_boReportClientDocument.ReportDefController.ReportObjectController.Modify(m_boReportObject, m_boReportObjectModified);
                //display in reportviewer
                crystalReportViewer1.ReportSource = m_boReportDocument;


    How add  tooltip report Crystal Reports .NET inproc RAS SDK , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , How To


    SAP Crystal Reports XI R2