The Interactive viewer works almost exactly like the Page viewer. In fact, the Interactive viewer component derives from the Page viewer component, so it inherits all the base functionality. What it adds is a new toolbar button that enables an advanced searching User Interface inside the viewer. This is useful for larger reports and for end users requiring advanced searches where simple text string searching is not suitable. The Interactive viewer allows the report to be filtered using a specified record selection criteria.
Listing 32.8 shows a report being viewed by the Interactive viewer. Note that the setOwnPage method is called to indicate that the viewer owns the entire page, which is generally a good thing to do when using this viewer.
//To create a Java interactive viewer you instantiate a //CrystalReportInteractiveViewer object: CrystalReportInteractiveViewer viewer = new CrystalReportInteractiveViewer(); //Set the viewers report source by calling its setReportSource method viewer.setReportSource(reportSource); //Enable the Advanced Search Wizard. viewer.setEnableBooleanSearch(true); //Set the setOwnPage property to true. The setOwnPage property should always //be set to true for the interactive viewer. viewer.setOwnPage(true); //After you have created and initialized a Java interactive viewer, //you call its processHttpRequest method to launch it in a Web browser. viewer.processHttpRequest(request, response, getServletContext(), null);
Figure 32.3 shows a report being displayed in the Interactive viewer and the advanced searching UI being used.
All viewers including the Interactive viewer share a number of toolbar elements. These properties can be programmatically toggled and are displayed in Table 32.2. All the viewer properties must be set before calling the ProcessHTTPRequest method that will display the selected report. For example, to ensure the Crystal logo is displayed when the involved report is viewed, the code line
Viewer.HasLogo(true);
needs to be included in the code before the processHTTPRequest method is called.
Part I. Crystal Reports Design
Creating and Designing Basic Reports
Selecting and Grouping Data
Filtering, Sorting, and Summarizing Data
Understanding and Implementing Formulas
Implementing Parameters for Dynamic Reporting
Part II. Formatting Crystal Reports
Fundamentals of Report Formatting
Working with Report Sections
Visualizing Your Data with Charts and Maps
Custom Formatting Techniques
Part III. Advanced Crystal Reports Design
Using Cross-Tabs for Summarized Reporting
Using Record Selections and Alerts for Interactive Reporting
Using Subreports and Multi-Pass Reporting
Using Formulas and Custom Functions
Designing Effective Report Templates
Additional Data Sources for Crystal Reports
Multidimensional Reporting Against OLAP Data with Crystal Reports
Part IV. Enterprise Report Design Analytic, Web-based, and Excel Report Design
Introduction to Crystal Repository
Crystal Reports Semantic Layer Business Views
Creating Crystal Analysis Reports
Advanced Crystal Analysis Report Design
Ad-Hoc Application and Excel Plug-in for Ad-Hoc and Analytic Reporting
Part V. Web Report Distribution Using Crystal Enterprise
Introduction to Crystal Enterprise
Using Crystal Enterprise with Web Desktop
Crystal Enterprise Architecture
Planning Considerations When Deploying Crystal Enterprise
Deploying Crystal Enterprise in a Complex Network Environment
Administering and Configuring Crystal Enterprise
Part VI. Customized Report Distribution Using Crystal Reports Components
Java Reporting Components
Crystal Reports .NET Components
COM Reporting Components
Part VII. Customized Report Distribution Using Crystal Enterprise Embedded Edition
Introduction to Crystal Enterprise Embedded Edition
Crystal Enterprise Viewing Reports
Crystal Enterprise Embedded Report Modification and Creation
Part VIII. Customized Report Distribution Using Crystal Enterprise Professional
Introduction to the Crystal Enterprise Professional Object Model
Creating Enterprise Reports Applications with Crystal Enterprise Part I
Creating Enterprise Reporting Applications with Crystal Enterprise Part II
Appendix A. Using Sql Queries In Crystal Reports
Creating Enterprise Reporting Applications with Crystal Enterprise Part II