# Define Expression Fields in Printing?

**YouTube:** [How to Define Expression Fields in Document Printing?](https://www.youtube.com/watch?v=3V3yjx4_fVU)

## How to Define Expression Fields in Document Printing?

In this tutorial, we’ll learn how to **design and use expressions** in the Designer Printing Format of Logic ERP.

***

### Steps to Create Expressions

* From the **Menu Bar**, go to **Continuous Printing → Sales Bill Print Designer and Printing**.
* Select the **required configuration** and sales bill, then click **Refresh**.
* Open the **Design Window**.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FGk54Luz8a0VgsTNa6Pj2%2FDesign%20-%20New.png?alt=media&#x26;token=c31747f9-673f-4342-952b-83366e709b71" alt=""><figcaption></figcaption></figure>

* Go to the **Properties Menu** (bottom left) and open the **Expression Designer**.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2Fxwcz6EdIJzYYtEesDR8E%2FExpression.png?alt=media&#x26;token=197d6ba5-8477-4fe1-82f8-b31a6d7600d9" alt=""><figcaption></figcaption></figure>

***

### Building Custom Expressions

#### Example 1: Sum Function

* Click on the **SUM function**.
* Browse and select the required fields.
* The system will calculate their total automatically.
* Use the **equals (=) symbol** to check the result instantly.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FSat3bQ61GbU2xej0936a%2FExample%20-%201.png?alt=media&#x26;token=06aa71ec-7cf2-4350-b334-08a71f2d9563" alt=""><figcaption></figcaption></figure>

#### Example 2: Convert Number to Words

* Select **Footer Details → Total Net Amount**.
* Insert this field into the designer.
* Apply the conversion function.
* Using the equals (=) symbol, you’ll see the amount displayed in words.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2F0DbGoctq7aepVZU7dp6m%2FExample%20-%202.png?alt=media&#x26;token=cdfcf9f7-4f06-4a5a-8c6a-b58317ba2528" alt=""><figcaption></figcaption></figure>

***

### Saving and Using the Expression

* Once your expression is complete, click **OK** to exit the Expression Designer.
* Click on the **Save Expression** button.
* Give your expression a **suitable name** (e.g., *Amount in Words*).

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FTupj6kYGPvg5lADNLffh%2FIn%20Words.png?alt=media&#x26;token=e10563bd-5feb-451c-add7-4cf42c8d46d6" alt=""><figcaption></figcaption></figure>

* The new expression will now appear under the **Expression Table** in the Properties menu.
* Right-click on it → **Insert** into the printing layout.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2FPJ7HG4w7bJqrP8HWiINJ%2FInseerr.png?alt=media&#x26;token=bba976fc-6088-4b8e-83fd-90b02bea7851" alt=""><figcaption></figcaption></figure>

* Save the changes.

***

### Preview

* Go to **Print Preview**.
* You’ll see the new expression (e.g., Amount in Words) correctly displayed in the bill format.

<figure><img src="https://4031188996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXMVkjt8zqHBQX1c9QvFS%2Fuploads%2F0e4prJWp3l9GKYZHO2xs%2F%7Breview.png?alt=media&#x26;token=5d9e1b05-9b55-434a-a0d4-bb8dca623f6c" alt=""><figcaption></figcaption></figure>
