- 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.
- Crystal Reports 2008
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
Reproducing the Issue
- In Crystal Reports, create a report off any data source.
- Create a formula that uses variables or running total fields.
- Save the formula. For example, name the formula "My Formula"
- Create a new Alert on the report, and notice the formula is not listed to be used in the Alert Condition.
- Under the menu "Report", select "Alerts - Create or Modify Alerts..."
- In the "Create Alerts" window, to create a new alert, click "New..."
- In the "Create Alert" window, enter a name and a message for the alert.
- Click on the "Condition..." button
- Notice in the Formula Workshop, it does not list the formula created on the report.
- 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.
- 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:
- Add a subreport in the Report Footer section of the report.
- Base the subreport off a database with a table that returns only one record.
- In the subreport, create a parameter of the data type the formula on the main report output. ( Most likely a number )
- 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.
- 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 )
- Now, when refreshing the report, if the condition is met, it will display the Alert.
The following sample report has been formatted using the above workaround:
- Alert on Second Pass formula.rpt
Alerts, CR, missing , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem
Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013
|Alert on Second Pass Formula.rpt|