-->

24 March 2020

Crystal Reports Formulas

  Asp.Net CS By Example       24 March 2020

  Crystal Reports Working with Formulas

  In this post, we learn Crystal Reports Formula. The Crystal Report most power part is formulas. It has ability to use power of analytical function and mathematical expressions to create complex formula.In Crystal Reports, we can use a formula to calculate a piece of data. That data is then inserted into our report.


To Create Formulas Fields in crystal report follow bellow steps:
  => Fisrt Goto 'Fields Explorer'.
  => Select 'Formula Fields'.
Fields Explorer

  => Right Click on it & select 'New'.
  => Now 'Formula Name' popup is open. Enter appropriate Formula Name and Click on 'OK' Button.
Formula Fields Name

  => Now 'Formula Workshop - Formula Editor' Screen will be open.
  => And After writing formula in Formula Editor then 'Save' it.
Formula Workshop

  Below listed the various elements are combined together using the rules of expression that govern our selected syntax (Crystal or Basic) to create the formulas used in our reports.
Sr.No Element Purpose
1) Fields We will frequently make references to field values that are contained in the underlying tables of our report. These will always be in the format of "tablename.fieldname", enclosed in braces { }. Example: {dtemp.EmpID}.
2) Functions There are various type of function available in crystal report that can used to perform operations on different types of numeric, date/time and string(txt) on many more.Example: AVERAGE({orders.Order Amount}).
3) Operators Crystal Reports allows for the use of several standard mathematical and comparison operators in report formulas. For example, the + sign can be used for addition, the > symbol means "greater than", and so on and so forth.
4) Other Formulas We can used the Other formulas which we have created eailer in crystal report. This formulas can be used by preceding them with the @ symbol, followed by the formula name, all surrounded by braces. Example: {@FormulaName}.

  After creating formula field we can use this on crystal Report.Formulas are not case-sensitive. They are also not sensitive to carriage returns or spaces.
use formula on crystal report
logoblog

Thanks for reading Crystal Reports Formulas

Previous
« Prev Post

No comments:

Post a Comment

Please do not enter any spam link in the comment box.