SAP Knowledge Base Article - Public

2140630 - Formulas missing when creating an Alert Condition in Crystal Reports

Symptom

  • Formula missing.
  • Unable to see formulas when creating an Alert.
  • When creating a condition for an Alert in Crystal Reports, some of the report formulas are not listed.
        
         
  • Note: Images and data in this SAP Knowledge Base Article are from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020
  • SAP Crystal Reports 2025

Reproducing the Issue

  1. In Crystal Reports, create a report based on any data source.
  2. Create a formula that uses variables or running total fields.
  3. Save the formula. For example, name the formula "My Formula"
  4. Create a new Alert on the report, and notice the formula is not listed to be used in the Alert Condition.
    • 4.1 Under the menu "Report", select "Alerts - Create or Modify Alerts..."
    • 4.2 In the "Create Alerts" window, to create a new alert, click "New..."
    • 4.3 In the "Create Alert" window, enter a name and a message for the alert.        
    • 4.4 Click on the "Condition..." button
        
      Alert - 01.png   
         
    • 4.5 Notice in the Formula Workshop, it does not list the formula created on the report.
        
      Formula_Missing.png

Cause

  • Alerts condition can be created on summary, database fields, and parameters.
  • Alerts condition cannot be created on second pass formulas, like formulas that uses shared variables, running totals,... and this is why the formula are not displayed in the list of available objects to use for the Alert conditions.

Resolution

  • To workaround this limitation, add a subreport, and pass the value of the second pass formula the subreport parameter. This will make the value available in the first pass in the subreport, and therefore the value can then be used in an Alert in the subreport.
         
  • Below are the generall steps on how to apply this workaround:
          
    1. Add a subreport in the Report Footer section of the report.
           
    2. Base the subreport off a database with a table that returns only one record.
         
    3. In the subreport, create a parameter of the data type the formula on the main report output. ( Most likely a number )
          
    4. In the main report, link the main report to the subreport parameter, on the formula that output the value you wanted to base the Alert on.
           
    5. In the subreport, create an Alert, and base the condition on the value output by the subreport parameter.
      ( Which actually contains the main report formula result )
             
    6. Now, when refreshing the report, if the condition is met, it will display the Alert.    

Keywords

Alerts, CR, missing , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2016 ; SAP Crystal Reports 2020 ; SAP Crystal Reports 2025