# Report Parameters

Reportql simplifies data visualization for users by allowing the use of various parameters. Below is a guide explaining the usage of different parameter types and their integration with dashboard elements.

These parameters are configured to affect dashboard elements. For example, selecting a date range can limit data visualization to a specific time period.

With this guide, you can optimize your data visualization processes and create user-friendly dashboards using Reportql.

### General Info

*After defining the parameter, you can use it in your queries using the programmatic name. (@startDate and @endDate are programmatic names of defined parameters)*

```
select * from orders where startdate between @startDate and @endDate 
```

*If you have an optional parameter, you can use it as follows:*

```
select * from customers where (@customerName is null or name = @customerName)
```

### Parameter Types

#### **Text**

Allows users to input free text. Ideal for fields like username, description, or comments.

#### **Integer**

Allows users to input integer values. Used for numerical data like age, quantity, or ranking values.

#### **Date**

Allows users to select dates. Facilitates data entry in date format.

#### **Checkbox**

Allows users to confirm an option. Used for binary choices like true/false or yes/no.

#### **Dropdown**

Allows users to select from predefined options. The list is fixed and cannot be changed.

<figure><img src="https://1732466415-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6RrvnlN4awUTsHV07p0p%2Fuploads%2FaOK7CFVBe3qE3ix0QtJf%2Fimage.png?alt=media&#x26;token=a1518fea-2a6c-4d54-a906-7cc23703f55c" alt=""><figcaption></figcaption></figure>

#### **Query Dropdown**

Allows users to select from options dynamically pulled from a data source.

* **Name field**: the name of the column to be displayed in the dropdown&#x20;
* **Value field**: ID column
* **Example Usage**: Product list, customer list.

```
SELECT ID, product_name FROM products
```

<figure><img src="https://1732466415-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6RrvnlN4awUTsHV07p0p%2Fuploads%2FjVyXdeTJuCaXqgtVdc9u%2Fimage.png?alt=media&#x26;token=78dce028-d01b-40cc-997f-0bf141ed00f6" alt=""><figcaption></figcaption></figure>

#### **Autocomplete**

Provides auto-completion suggestions from predefined options as users enter text.

* **Name field**: the name of the column to be displayed in the dropdown&#x20;
* **Value field**: ID column
* **Filter field**: Field to filter in search
* **Example Usage**: Product list, customer list.

```
SELECT ID, product_name FROM products
```

<figure><img src="https://1732466415-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6RrvnlN4awUTsHV07p0p%2Fuploads%2FyucjovkicjDZcVDOrC0E%2Fimage.png?alt=media&#x26;token=9fda2b50-88ed-49d0-8af6-856d996689de" alt=""><figcaption></figcaption></figure>
