SAP Knowledge Base Article - Public

2029452 - How to jump to a specific record in the Crystal Report Viewer

Symptom

When viewing a Crystal Report using the CrystalReportViewer, it can be useful to jump to a specific record in the report.

Environment

  • SAP BusinessObjects Enterprise XI 3.1
  • SAP BusinessObjects Business Intelligence platform 4.0
  • SAP BusinessObjects Business Intelligence platform 4.1

Resolution

To accomplish this, use the SearchText method off of the CrystalReportViewer object to search for something unique to the record you are searching for.  This will cause the viewer to jump to the page and line that the text can be found.

Example Viewer Code:

CrystalReportViewer viewer = new CrystalReportViewer();
   
viewer.setName("CrystalReportViewer");
viewer.setOwnPage(true);

//Enable Active-X print mode. 
viewer.setPrintMode(CrPrintMode.ACTIVEX);

//Obtain report source of the report that the viewer will display.   
viewer.setReportSource(MyReportObject.getReportSource());
viewer.searchText("SomeUniqueText", 0);
viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);

Keywords

Jump Search Find unique record sdk java , KBA , BI-DEV-JAV , BI Software Development Kits (SDKs) - Java , Problem

Product

SAP Crystal Reports 2011