articles

Formula Field in Crystal Report

Formula Field in Crystal Report

Chris Anderson49571 09-Aug-2011

If you have a Crystal Reports with Qty and Price fields and you need an additional field in your Crystal Reports for Total, that is TOTAL = QTY X PRICE . In these types of situations you can use the Formula Field in Crystal Reports.

After you create a Crystal Report, Next step is to create a Formula Field for showing the result of Qty * Price.

Right Click the Formula Field in the Field Explorer and click New. Then you will get an Input Message Box, type name of the formula in textbox and click OK.

Formula Field in Crystal Report

Now you can see the Formula Editor screen. Here you can enter which formula you want. Here we want the result of Qty X Price. For that we select product.product_quantity, the multiply operator (*) and product.product_price. Double click each field for selection.

Formula Field in Crystal Report

Now you can see Total under the Formula Field. Drag the field in to the Crystal Reports where you want to display Total.

Formula Field in Crystal Report

You can see the output in the Main Report preview.

After you create a formula field for Total, Next step is to create a Formula Field for showing the Reorder status of the product. Right Click the Formula Field in the Field Explorer and click New and type the name of the formula as reorder.

Formula Field in Crystal Report

In this example, if the product quantity is less than 50unit then reorder level are necessary else there is no need to reorder the quantity. The following formula using an If expression would accomplish the task.

Formula Field in Crystal Report

Type the formula and click on the save and close option.

Now you can see reorder field under the Formula Field. Drag the field in to the Crystal Reports where you want to display Total.

Formula Field in Crystal Report

Formula Field in Crystal Report

You can see the output in the Main Report preview or run an application.


Updated 21-Feb-2020
hi I am software developer at mindstick software pvt. ltd.

Leave Comment

Comments

Liked By