# Import Report

<div align="left"><figure><img src="/files/ejBZZeDrq5sOKCU38C1E" alt=""><figcaption></figcaption></figure></div>

The image used in the following description is an image of PostgreSQL linkage. \
Other database linkage has the same screen configuration.

## Function overview

* **Import Report** links database to i-Reporter.&#x20;

<table><thead><tr><th width="271.3333333333333">Cooperation direction</th><th width="215">Function description</th><th>Execution timing</th></tr></thead><tbody><tr><td>Database→i-Reporter linkage</td><td>Automatically create i-Reporter report based on database data.</td><td>Call the API(Webhook) generated by the mapping Settings of i-Repo Link from the external system.</td></tr></tbody></table>

## Steps for mapping settings

Follow the steps below to set the mapping.

### 1. Selecting a connection pattern with database

* Click the **Import Report** menu to add a new mapping.

<figure><img src="/files/u1JD4zITNlHtZPTXa9Dn" alt=""><figcaption></figcaption></figure>

### 2. Mapping code/name setting

* Set the **mapping code** and **mapping name**.
* A mapping code is the **key that uniquely identifies all mapping configurations within the i-Repo Link environment**.

<figure><img src="/files/cmMzGIt31vuCHIlFDbzP" alt=""><figcaption></figcaption></figure>

### 3. Select the data sources and tables/views as the source of linkage

* Select the database **data source** and **table or view** as the source of linkage.

<figure><img src="/files/rY3zjvVBf9ji56wOm65B" alt=""><figcaption></figcaption></figure>

* Refer to the following page to add and configure data sources.

{% content-ref url="/pages/Mr8iIh9WBLvgsGDHpX6I" %}
[Data source management](/i-repo-link-manual/english/system/2/1.md)
{% endcontent-ref %}

### 4. Selecting the Forms to link

<figure><img src="/files/mqYYOnkoJC970XgNPIYg" alt=""><figcaption></figcaption></figure>

### 5. Map database fields and clusters of i-Reporter form

* The database information is displayed on the left side of the screen, and the i-Reporter report information is displayed on the right side of the screen.
* If the fields in the database are light gray are fields not subject to linkage.&#x20;
* If it cannot be mapped, an error message is displayed.

<figure><img src="/files/EJ4Ba2Ngd5bTpWVIJl4f" alt=""><figcaption></figcaption></figure>

* See the following pages for combinations of fields and clusters that you can map.

{% content-ref url="/pages/Y7Ft3ZPcBcLr747MD2oo" %}
[PostgreSQL and i-Reporter linkage item mapping table](/i-repo-link-manual/english/data-source-linkage-all-databases-common/common/postgresql-and-i-reporter-linkage-item-mapping-table.md)
{% endcontent-ref %}

{% content-ref url="/pages/R6QkYEWr5ZY8AS7lg1yN" %}
[Oracle and i-Reporter linkage item mapping table](/i-repo-link-manual/english/data-source-linkage-all-databases-common/common/oracle-and-i-reporter-linkage-item-mapping-table.md)
{% endcontent-ref %}

### 6. Setting data search condition

* Set search condition to extract data from the database. \
  A report is automatically created based on the searched data.&#x20;
* Please **set the search condition so that there is only one record**. \
  If multiple records are searched, import report will fail.&#x20;
* You can specify a fixed value and API parameters (query parameters) as search condition.\
  You can specify up to 10 API parameters. \
  **Parameter names** should be specified with param1 to 10. (fixed values do not need to be specified as API parameters.)

<figure><img src="/files/bMnV7vrzAewuf0jABdNT" alt=""><figcaption></figcaption></figure>

### 7. Setting Webhook URL

#### Webhook URL for i-Reporter setting

* **The Webhook URL for i-Reporter setting** generates an API that is called when the external system performs automaticaly import report.
* When using API parameters (query parameters), specify them at the end of this Webhook URL.\
  API parameters are added in the format of "param1=\[value]" after the "?". Parameters are connected by "&".\
  Example: the value ABC is specified in API parameter 1 and the value 123 is specified in API parameter 2 \
  \[HTTP or HTTPS]://\[domain]/i-RepoLink/API/mappings/\[mapping code]/autoGenerate? **param1=ABC\&param2=123**<br>

<figure><img src="/files/q0FssazCgeeqyFRyihkJ" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cimtops.gitbook.io/i-repo-link-manual/english/menu/import-report.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
