In this article we will see how we can create a dynamic parameter for canned reports.This document has been created for Helical Insight version 4.1 GA.

A parameter is a variable that takes the value passed by the user and hence the data gets filtered before it is displayed on your screen.

A parameter can be static or dynamic. Static parameters are those that are created using the columns present in Select statement of the query. For example, in our sample database we can select “Travel_medium” as one parameter and all the values will be then populated under “Travel_medium” parameter from the database( as shown in the below image)

Adding A Dynamic Parameter To Canned Report

Dynamic parameters are those wherein a user can even select which column will get used as a filter as well. We can have our own filter expression here which gets executed as a part of the query. For eg: Travel_type‘domestic’ and mode_of_payment = ‘Cheque’. In the image below, static and dynamic parameters are shown.

Adding A Dynamic Parameter To Canned Report

STEP1 : Create the datasourceconnection.

You can learn more about the datasource connections from this blog.

Adding A Dynamic Parameter To Canned Report

STEP 2: Write a query without using parameter/where clause

A. After providing the connection details in the previous step, click on + button next to Queries.

Adding A Dynamic Parameter To Canned Report

B. Select the connection to be used for the query.

Adding A Dynamic Parameter To Canned Report

C. Click on Configuration icon highlighted by green box and write the query without where clause or any input parameters in the editor pane.

Adding A Dynamic Parameter To Canned Report

D. Save the query by clicking on Apply or using keyboard shortcut Ctrl+S.

E. Click on Run to execute the query.

STEP 3: Add a dynamic parameter

A. Click on + icon next to parameter. You can add as many parameters as required.

Adding A Dynamic Parameter To Canned Report

B. Select the type of input parameter. For dynamicWhere, the type should be set to String.

Adding A Dynamic Parameter To Canned Report

C. Edit the name of the parameter by clicking on the pencil icon next to delete icon.Let us give it a name dynamicWhere.

Adding A Dynamic Parameter To Canned Report

STEP 4: Edit the Configuration of the input parameter

A. Select the connection for the query of the input parameter.

Adding A Dynamic Parameter To Canned Report

B. Write the query that will return the input parameter column in the SQL section.To write the SQL for dynamic parameter we can select any table that is present in the main query. So a sample sql that would be generated with such default value would be Select * from table_name Where 1=1 and hence there is no trade off while executing the query.

Adding A Dynamic Parameter To Canned Report

C. If the query is of groovy or adhoc type, select the correct type by clicking on S and selecting the type. The three options available are SQL, SQL.GROOVY, SQL.ADHOC

Adding A Dynamic Parameter To Canned Report

D. Click on Apply or Ctrl+S to save the query

E. Go to configuration section and give the configuration that you desire. Please note that the variable name, name specified within the configuration and the name of the parameter should match exactly as shown in the below image. All the three highlighted portions should have the exactly the same name

Adding A Dynamic Parameter To Canned Report

Dashboard.setVariable('dynamicWhere', '1=1');
var dynamicWhere = {
                name: "dynamicWhere" ,
                displayName : "dynamicWhere",
                type:  "input",             
                parameters:["dynamicWhere"],
                listeners : [],                         // name of components
                requestParameters :{},                  // name of components
                triggers : [],                          // add component names to trigger on change
                options:{

                    multiple: false,                    // it can be true or false
                    display : 'column_name',
                    value : 'column_name',
                    placeholder: 'select value'
                    //all: true,                        // used for checkbox
                    //displayFormat : 'YYYY-MM-DD',     // used for date/datetimepicker
                    //outputFormat : 'YYYY-MM-DD'       // used for date/datetimepicker
                },
                htmlElementId : "#htmlelement_id",              
                executeAtStart: true,            // it can be true or false
                map: 2,
                efwd : {
                    file: ‘__efwd_file_name__'
                },

Since the user has to define what column is to be passed for filter, the type to be selected will be input. Following is the configuration for dynamic parameter.

The default value for this parameter will be 1=1. Type is input as the user passes the filter expression.

STEP 5: Add listener of parameter to query section

Now we have to specify that this report should listen to this dynamic parameter.

A. Click on P icon. You will see the added parameter list i.e, dynamicWhere. Select it.

Adding A Dynamic Parameter To Canned Report

B. Add brackets for listener.

Click on listener name, dynamicWhere to see the Quotes. Add () for open and closed as shown below.

Adding A Dynamic Parameter To Canned Report

STEP 6: Add where clause to the query

Now in the actual SQLQuery for the report we will add parameter so that it can listen and whatever is the value users passes, it gets passed to that specific placeholder.

Add where clause in the query section using the selected parameters. For using the values returned by the parameter, use the parameter name with $ sign and within {}. Syntax – ${parameter_name}.

Save the query and execute to get the result set.

Adding A Dynamic Parameter To Canned Report

STEP 7: Go to the Canvas to Use Parameters on the report

After adding dynamicWhere in the datasources page, go to Canvas.

1. In the Datasources pane under Calculations/Parameters, you will see that this parameter has been added. This parameter can now be used in the report, if required by simply dragging it like any other variable.

Adding A Dynamic Parameter To Canned Report

STEP 8: Preview the report

Click on Preview icon to preview the report. Click on the hamburger icon, you can see the parameter in the position that you have mentioned, in this case dynamicWhere and its default value.

Adding A Dynamic Parameter To Canned Report

You will see the default value for dynamicWhere parameter here. It can be changed to any normal filter expression.

Dynamic parameter can be clubbed along with static parameter. For example for our sample travel data: Select * from “travel_details”where “travel_medium” = ${travel_medium} and ${dynamicWhere}.

Helical Insight’s self-service capabilities is one to reckon with. It allows you to simply drag and drop columns, add filters, apply aggregate functions if required, and create reports and dashboards on the fly. For advanced users, the self-service component has ability to add javascript, HTML, HTML5, CSS, CSS3 and AJAX. These customizations allow you to create dynamic reports and dashboards. You can also add new charts inside the self-service component, add new kind of aggregate functions and customize it using our APIs.
Helical Insight’s self-service capabilities is one to reckon with. It allows you to simply drag and drop columns, add filters, apply aggregate functions if required, and create reports and dashboards on the fly. For advanced users, the self-service component has ability to add javascript, HTML, HTML5, CSS, CSS3 and AJAX. These customizations allow you to create dynamic reports and dashboards. You can also add new charts inside the self-service component, add new kind of aggregate functions and customize it using our APIs.
Helical Insight, via simple browser based interface of Canned Reporting module, also allows to create pixel perfect printer friendly document kind of reports also like Invoice, P&L Statement, Balance sheet etc.
Helical Insight, via simple browser based interface of Canned Reporting module, also allows to create pixel perfect printer friendly document kind of reports also like Invoice, P&L Statement, Balance sheet etc.
If you have a product, built on any platform like Dot Net or Java or PHP or Ruby, you can easily embed Helical Insight within it using iFrames or webservices, for quick value add through instant visualization of data.
If you have a product, built on any platform like Dot Net or Java or PHP or Ruby, you can easily embed Helical Insight within it using iFrames or webservices, for quick value add through instant visualization of data.
Being a 100% browser-based BI tool, you can connect with your database and analyse across any location and device. There is no need to download or install heavy memory-consuming developer tools – All you need is a Browser application! We are battle-tested on most of the commonly used browsers.
Being a 100% browser-based BI tool, you can connect with your database and analyse across any location and device. There is no need to download or install heavy memory-consuming developer tools – All you need is a Browser application! We are battle-tested on most of the commonly used browsers.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
We have organization level security where the Superadmin can create, delete and modify roles. Dashboards and reports can be added to that organization. This ensures multitenancy.
A first-of-its-kind Open-Source BI framework, Helical Insight is completely API-driven. This allows you to add functionalities, including but not limited to adding a new exporting type, new datasource type, core functionality expansion, new charting in adhoc etc., at any place whenever you wish, using your own in-house developers.
A first-of-its-kind Open-Source BI framework, Helical Insight is completely API-driven. This allows you to add functionalities, including but not limited to adding a new exporting type, new datasource type, core functionality expansion, new charting in adhoc etc., at any place whenever you wish, using your own in-house developers.
It handles huge volumes of data effectively. Caching, Pagination, Load-Balancing and In-Memory not only provides you with amazing experience, but also and does not burden the database server more than required. Further effective use of computing power gives best performance and complex calculations even on the big data even with smaller machines for your personal use. Filtering, Sorting, Cube Analysis, Inter Panel Communication on the dashboards all at lightning speed. Thereby, making best open-source Business Intelligence solution in the market.
It handles huge volumes of data effectively. Caching, Pagination, Load-Balancing and In-Memory not only provides you with amazing experience, but also and does not burden the database server more than required. Further effective use of computing power gives best performance and complex calculations even on the big data even with smaller machines for your personal use. Filtering, Sorting, Cube Analysis, Inter Panel Communication on the dashboards all at lightning speed. Thereby, making best open-source Business Intelligence solution in the market.
With advance NLP algorithm, business users simply ask questions like, “show me sales of last quarter”, “average monthly sales of my products”. Let the application give the power to users without knowledge of query language or underlying data architecture
With advance NLP algorithm, business users simply ask questions like, “show me sales of last quarter”, “average monthly sales of my products”. Let the application give the power to users without knowledge of query language or underlying data architecture
Our application is compatible with almost all databases, be it RDBMS, or columnar database, or even flat files like spreadsheets or csv files. You can even connect to your own custom database via JDBC connection. Further, our database connection can be switched dynamically based on logged in users or its organization or other parameters. So, all your clients can use the same reports and dashboards without worrying about any data security breech.
Our application is compatible with almost all databases, be it RDBMS, or columnar database, or even flat files like spreadsheets or csv files. You can even connect to your own custom database via JDBC connection. Further, our database connection can be switched dynamically based on logged in users or its organization or other parameters. So, all your clients can use the same reports and dashboards without worrying about any data security breech.
Our application can be installed on an in-house server where you have full control of your data and its security. Or on cloud where it is accessible to larger audience without overheads and maintenance of the servers. One solution that works for all.
Our application can be installed on an in-house server where you have full control of your data and its security. Or on cloud where it is accessible to larger audience without overheads and maintenance of the servers. One solution that works for all.
Different companies have different business processes that the existing BI tools do not encompass. Helical Insight permits you to design your own workflows and specify what functional module of BI gets triggered
Different companies have different business processes that the existing BI tools do not encompass. Helical Insight permits you to design your own workflows and specify what functional module of BI gets triggered