Adding Alerting to Your Reports

Although calling out outlying values can be accomplished by using conditional formatting, the alerting feature inside Crystal Reports allows for more interactive identification of key data as well as pushing of those alerts to end users via Crystal Enterprise's alerting functionality.

A report alert is a custom notification created within Crystal Reports, triggered when a predetermined condition is met. An alert is comprised of three integral parts:

  • Name
  • Trigger (condition or threshold)
  • Message

Alerts serve the dual functions of bringing end-user attention to a certain condition being met and focusing end-user attention on specifically relevant data in a reportthereby increasing user efficiency. Some examples of reports in which alerts could provide a benefit are outlined in Table 11.1.

Table 11.1. Reports with Potentially Useful Alerts

Report

Alert

Alert Trigger and Result

Product Sales

Report

Product Profitability

Warning

Trigger: Specific product profitability below 10%

Result: A listing of the least successfully selling products

Customer Churn Report

Regional Customer Churn Warnings

Trigger: Specific regions where Customer Churn Rate is higher than 3% in a quarter

Result: A listing of regions to increase competitive analysis or to review regional management practice

Income Statement

Company Divisions with Net Losses

Trigger: Company division with net income < 0

Result: A listing of divisions where deeper business analysis is required

Report alerts are triggered when the report is processed and the associated condition has been met. When this condition is true, the alert message will be displayed. Figure 11.3 displays a triggered alert from within the Crystal Reports Designer.

Figure 11.3. A report alert being triggered.

graphics/11fig03.jpg

 

Creating, Editing, and Using Alerts

To create or edit alerts in Crystal Reports, select the Report, Alerts, Create or Modify Alerts menu items. This dialog (shown in Figure 11.4) enables you to create a new alert, edit existing alerts, and remove existing alerts.

Figure 11.4. Clicking Edit on the Create Alerts dialog opens the Edit Alert dialog.

graphics/11fig04.jpg

To create the alert, follow these steps:

  1. Give the alert a name. This name should be meaningful and will be displayed to the user when the alert is triggered.
     
  2. Specify a condition for which to trigger the alert. An example of this would be {Customer.Last Year's Sales} < $10000. The condition is simply a formula using either Crystal or Basic syntax that evaluates to a true or false result. True means the alert should be triggered; false means that it should not.
     

    NOTE

    You can use other formulas and parameters inside this condition. Using a parameter to determine the threshold on your alert is useful because the report could then be viewed by different audiences with different thresholds, and they could still see the alert triggered for their respective numbers.

  3. Give the alert a message to display when it has been triggered. This can be a hard-coded string, or can be a formula such as
     

    
     
     
    
    "Sales are over $" + ToText({Customer.Last Year's Sales})
    
    
     

To see your alert in action, refresh the report with data that meets your alert condition, and triggered alerts will be displayed.

Finally, not only are you notified that the alerts have been triggered, you can click the View Records button on the Report Alerts pop-up dialog to filter the report to show only those records that triggered the alert. This is a good way to draw attention to the key outliers in the data.

Using Alerts in Crystal Enterprise

The Report Alerts dialog displayed in Figure 11.3 is only available from within the Crystal Reports Designer. If you are delivering your reports via another mechanism such as the Web, alerts are handled differently. To have your end users take advantage of Crystal Reports alerting, you will need to either use Crystal Enterprise for report distribution or exploit the built-in alert functions (IsAlertEnabled(), IsAlertTriggered(), and AlertMessage()) within formulas you create in your report.

For more information on Crystal Enterprise, see Chapter 24, "Crystal Enterprise Architecture."

Typically, alerts can be shown to end users in a portal, which then links back to the report.

TIP

End users viewing a report from an alert in Crystal Enterprise do not see the items matching the alert conditionsthey see the entire report. This leads to some discontinuity both from the Crystal Reports experience and also from the end users' expectation that they should now see values called out in the alert.

To make this more logical for the end user, create a version of the same report (perhaps use a naming convention like ALERT_reportname.rpt) with the alert and also a filtering condition matching the alert condition. Thus, when end users click on an alert in Crystal Enterprise, they will see a version of the report containing only the relevant values.


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



Special Edition Using Crystal Reports 10
Special Edition Using Crystal Reports 10
ISBN: 0789731134
EAN: 2147483647
Year: 2003
Pages: 341

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net