Queries

Kalipso - Developing - Report - Properties - Queries

To get data to be printed in the report, its possible to define SQL queries. These queries are similar to the ones performed in the SQL advanced action.

When you access to this tab displays a table with queries already created on which you can edit, delete or create a new one. Thus:

The table presents the following information:

  • Name - The name assigned to the query.

  • Query - SQL Query.

  • Database Profile - Database connection profile used when running the query.

On the right side are the options to create a new query, edit a query selected in the table or delete a selected query.

To learn more about "Database Connection Profiles" click here.

Create / edit a query

When you click on add a new query a new window appears that allows you to create it. This window is similar to the one that appears when editing an already created query. Therefore, the process for both actions is described simultaneously.

The window has two tabs: query and targets. The first tab shows the following information:

  • Name - The name assigned to the query.

  • Database Profile - Database connection profile used when running the query.

The rectangle below offers up a zone to write the desired SQL code.

Below, a table with all available functions to be associated with the consultation is available on the left side. On the right side you can work on global and / or local variables.

Only valid SQL code is considered and accepted.

The second tab is dedicated to targets.

The table shows the following information:

  • Column - Name of the column to retrieve. This parameter is merely informative and has no impact whatsoever. What matters is the index of the Column. Therefore, this refers to the first returned Column.

  • Target - Report Variable where to save the value of the first Column.

As you can see from the options on the right, you can add, edit and delete targets for queries.

When adding or editing the following screen appears:

Here you just have to add a column name (for information only) and define the target variable.

Last updated