English 中文(简体)
Crystal Reports Tutorial

Selected Reading

Creating & Modifying Formulas
  • 时间:2025-01-05

Creating & Modifying Formulas


Previous Page Next Page  

You can create single or multiple formulas in one go and use them in your report. You can also delete the formulas, or search and change text of formulas in the formula text window.

To create a new formula, you can right cpck on Formula tab under Data Explorer. Once you cpck on the new formula → enter the formula name → it opens the formula workshop.

New Formula

You can also create a new formula by opening the Formula workshop from the Formula tab under Data → New → New Formula as shown in the following image.

Formula Tab

To write a formula in the formula text window, you can use in-use objects under the Operator tab and different operators to pass condition in the formula.

Operator Tab

formula can be saved using the save option at the bottom of the page. Once the formula is saved it comes under the pst of formulas in Data Explorer tab.

Data Explorer Tab

You can drag this formula to any section of the report.

Section

In the above snapshot, Test formula has been dragged to Report footer and it has calculated value as Quantity sold/2 in the Report footer.

Now to modify the formula,cpck on formula name under Data explorer, it will open the Formula workshop. Make changes to formula and use the save button at the bottom to save the changes. These changes will be automatically appped to the Report values.

To delete the formula from a report, right cpck on the formula name and cpck on Delete.

Delete Formula

Problem pane at bottom is used for debugging purpose. It shows you the syntax error in the formula. The error message in the following image says that the field in red underpne is not known as field syntax and is incorrect.

Problem Error Advertisements