Directory: 1. Creating a calculation field Add to Report 2, format the text on the report 3, extract a part or multiple parts of the text string, extract some of the sections in the date, use custom functions ------ -------------------------------------------------- -------- formula has a variety of uses. If a special data operation is required, you can use the formula to complete. -------------------------------------------------- -------------- 1, create a calculation field to add to the report calculation discount 15% after price:
Crystal syntax example:
{Order detail. Unique price} *. 85
Basic syntax example:
Formula = {Order detail. Unique price} *. 85 --------------------------------------- -------------------------- 2, the text on the formatting report will change all the values in the "Customer Name" field to uppercase letters:
Crystal syntax example:
Uppercase ({Customer. Customer Name})
Basic syntax example:
Formula = ucase ({Customer. Customer Name}) --------------------------------------- ------------------------- 3, extract a part or multiple parts of the text string to extract the first letter of the customer name:
Crystal syntax example:
{Customer. Customer Name} [1]
Basic syntax example:
Formula = {Customer. Customer Name} (1) --------------------------------------- -------------------------- 4, the part of the extraction date: Determine the month of the order:
Crystal syntax example:
Month ({Order. Order Date})
Basic syntax example:
Formula = month ({Order. Order Date}) --------------------------------------- ------------------------- 5, use custom functions to convert $ 500 from the US currency to Canada currency:
Crystal syntax example:
CDCONVERTUSTOCANADIAN (500)
Basic syntax example:
Formula = CDCONVERTUSTOCANADIAN (500)