After you have created a database connection now it's time to create a report. There are 2 ways you can create a report.

Report Builder Mode

Allows you to search for a table/view and select the desired columns for the report. It also allows you to set up report filters to enable users to filter data at runtime.

SQL Mode

Allows you to write your own SQL.

In this short course, you will learn how to create a report using SQL. You can use the same SQL you have been using in your reporting systems. Just copy and paste it in the Kloudio SQL editor. You can also add filters to your SQL.

Here are the steps:

Step 1: Go to Kloudio Reports and click the + New Report button. You will see the below screen. This is our Reports wizard that will guide you to define your report.

Step 2: Select SQL Report Option

Step 3: Write SQL

Select a connection from the connections dropdown.

Start writing your SQL. In case if you want to lookup for a table or column, you can use the left side panel to search for tables/columns. This side panel is for reference purpose only.

Step 4: Run and Save the Report

Once you complete documenting the Sql Query, you can click on the Run button to test the query so then you get the preview data if everything goes fine. If there is an error, an error message will be shown in the console below the Query Editor.

After verifying the sample records from the test, give a name to your Kloudio report and click Save

Adding Filters for sql editor reports

To add filters to sql editor reports, follow the below steps

1. Enter the sql query in this format for adding filter to a column

select * from table_name where column_name={{column_name}}

2. Click on SQL Variables

3. Enter the filter value in SQL Variables popup.

For e.g. sathish@kloud.io.

Click on Save & Close button

4. Click on Run button and the data filtered based on the entered filter value would be shown

5. To add filter for another column, enter the filter for column after adding and in the sql query

For e.g. select * from table_name where column_name1={{column_name1}} and column_name2={{column_name2}}

Did this answer your question?