Report Design: What is calculated field & how to use calculated fields in report

From AutoCount Resource Center
Jump to navigation Jump to search

Question: What is calculated field & how to use calculated fields in report?


Answer:

Basically, Calculated Field is a feature that allows users to do customized calculation at their Report (printout) level. For example, if user added UDF fields and wish to do calculation such as: UDF1 + UDF2, the value can be calculated, preview and printed at report level. This value will not be stored in the database and only calculated every time the report is loaded.

After understanding the usage of this feature, let me guide you thru in the report designer how to actually implement and use this feature. For now, 2 new UDF will be created in Quotation Detail for the demonstration of this feature.


Cal field1.png


How to Create Calculated Fields

In report designer, you can create Calculated Fields from the Field List Box over on the left-hand side (by default). Depending whether you want to create it at Master Level or Detail Level, you may right click on the Master / Detail table and choose Add Calculated Field in order to add this field. For now, we will need to add one Calculated Field at Detail level as the UDF1 and UDF2 calculation will be done at detail.

For now, we will do a simple calculation where UDF1 + UDF2. Below are step by step instructions with screenshots in order to understand better:


Right Click on the Quotation Detail and click on Add Calculated Field.


Cal field2.jpg


After added the Calculated Field, you will find there is a new field in the Quotation Detail name “ calcultedfield1″.


Cal field3.jpg


User can change the name of the field at the property grid after selecting “calculatedfield1″.


Cal field4.jpg


User can select the specific field type that wish to do this special formula. Usually it will be decimal.


Cal field5.jpg


click on the tripe dots icon at the right side of Expression to start put in their formula.


Cal field6.jpg


User will be prompted into an Expression Editor, which comes together with Math Operator such as “+”, “-”, “x” and so on.


Cal field7.jpg


Now, look for the Field category and the fields that will be used for the formula. Double click on the field that wish to use for the formula after found.


Cal field9.png


After selecting the appropriate fields for the formula (as image for this scenario), just click on OK button.


Cal field10.png


Do a data binding on the label that you wish to see this result on.


Cal field11.jpg


The result will be presented according to the formula you have set.

Cal field12.png


By: JS 150204, KM 180312, P180322



Go to menu

IconAcc20.PNG AutoCount Accounting 2.0


IconAcc188.PNG AutoCount Accounting 1.8 / 1.9
Wiki-Payroll.png AutoCount Payroll
Wiki-POS.PNG AutoCount POS
Wiki-AOTG.PNG AutoCount On The Go
Wiki-Accounting-Plugin.png AutoCount Accounting Plug-In Documentations