There are various methods of integrating Helical Insight. One of the methods is using iFrame which we would be discussing here.
Following are the steps to achieve :
- Create a report or dashboard using Helical Insight which you want to integrate
- Right click on the report or dashboard and open it in a new window. This way you will be able to get the URL specific to that report or dashboard.
- Create a dummy user or use an already existing user for integration purpose.
- Assuming dashboard to integrate, for this required folder/s, reports, metadata and dashboard has to be shared with that user. How to share file with a user clickhere
- Once the required files are shared with the user then it will be in read only mode (dummy user cannot make any changes in the reports / dashboards)
- For integration, an iframe code has to be included in application or web page. In that iFrame, pass the URL of the report or dashboard along with passing the username as well as password as indicated below.
Upto HelicalInsight v4.1GA
HI v5.0 Onwards
iframe code :
Upto HelicalInsight v4.1GA
<iframe id="helicalinsight-report-frame" src="https://applicationHost.com:8085/hi-ee/hi.html?dir=Travel_Dashboard&file=travel_dashboard.efw&mode=dashboard&j_organization=organization_name&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen>
</iframe>
HI v5.0 Onwards
<iframe id="helicalinsight-report-frame" src="https://applicationHost.com:8085/hi-ee/#/report-viewer?dir=Travel_Dashboard&file=travel_dashboard.efwdd&mode=dashboard&j_organization=organization_name&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen>
</iframe>
Whereas,
iframe id : any unique name can be assigned
src (source) : It includes combination of source URL where Helical insight is installed, organization name, user name, user password, dashboard path and dashboard filename.
http://applicationHost.com:8085/hi-ee/hi.html : It is the baseURL of the application until version 4.1GA and port number on which application is running. http://applicationHost.com:8085/hi-ee/#/report-viewer: It is the baseURL of the application version 5.0 onwards and port number on which application is running.
Upto HelicalInsight v4.1GA
HI v5.0 Onwards
dir=Travel_Dashboard : It shows the directory name. In this case directory name is Travel_Dashboard.
file=travel_dashboard.efw : If you are using Helical Insight version 4.1 GA or older. It shows the dashboard file name and the extension used is “.efw”. In this case, file name is travel_dashboard.efw.
file=travel_dashboard.efwdd : For Helical Insight version 5.0 onwards, It shows the dashboard file name and the extension used is “.efwdd”. In this case, file name is travel_dashboard.efwdd.
mode=dashboard: mode parameter holds report type. If report is dashboard then mode=dashboard and if report is adhoc report then mode=report
j_organization=organization_name : j_organization parameter holds organization name. If organization is not present (login through superadmin) no need to pass this parameter.
j_username=user_name j_username parameter holds username.
j_password=login_password : j_password parameter holds password.
Note 1: This link might be changed based on the port and extension provided while installation of Helical Insight.
Note 2: Here in the URL we are passing the username and password in plain text. The same can be sent in tokenized encrypted format as well as Single Sign On can be implemented. You can refer to our other blogs related to SSO, support of CAS and support of LDAP,oAuth, ADFS etc. to learn more about the same.
Note 3: Some browsers, like Chrome and Safari etc, do not allow HTTP calls over HTTPS for enhanced security. Hence, both the parent application and Helical Insight must be on HTTPS to avoid such issues.
Note 4: In order to avoid cross-origin and cookie related issues (which generally happens with chrome safari), follow the below given steps:
1. Go to web.xml file located at …/hi/apache-tomcat-9/webapps/hi-ee/WEB-INF/
2. Uncomment lines 32 to 62. This will enable cross-origin.
3. Uncomment lines 170 to 180 to add extra headers for cookies.
4. Save the file and restart the server.
Passing Input parameters via URL
We can also pass input parameters while integrating any report/dashboard using iframe
To pass the input parameters we have to update iframe URL with parameter name and its value
Upto HelicalInsight v4.1GA
<object id="helicalinsight-report-frame" data="http://applicationHost.com:8085/hi-ee/hi.html?dir=Travel_Dashboard&file=travel_dashboard.efw&mode=dashboard&TERRITORY=[“Japan”, “NA”,“Emea”]&STERRITORY=NA&j_organization=organization_name&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen>
</iframe>
HI v5.0 Onwards
<object id="helicalinsight-report-frame" data="http://applicationHost.com:8085/hi-ee/#/report-viewer?dir=Travel_Dashboard&file=travel_dashboard.efwdd&mode=dashboard&TERRITORY=[“Japan”, “NA”,“Emea”]&STERRITORY=NA&j_organization=organization_name&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen>
</iframe>
Or
Upto HelicalInsight v4.1GA
<iframe id="helicalinsight-report-frame" src="https://applicationHost.com:8085/hi-ee/hi.html?dir=Travel_Dashboard&file=travel_dashboard.efw&mode=dashboard&TERRITORY=%5B“Japan”, “NA”,“Emea”%5D&STERRITORY=NA&j_organization=organization_name&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen>
<iframe>
HI v5.0 Onwards
<iframe id="helicalinsight-report-frame" src="https://applicationHost.com:8085/hi-ee/hi.html?dir=Travel_Dashboard&file=travel_dashboard.efw&mode=dashboard&TERRITORY=%5B“Japan”, “NA”,“Emea”%5D&STERRITORY=NA&j_organization=organization_name&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen>
<iframe>
Format of Iframe code with input parameters:
Upto HelicalInsight v4.1GA
<iframe id="helicalinsight-report-frame" src="https://applicationHost.com:8085/hi-ee/hi.html?dir=Travel_Dashboard&file=travel_dashboard.efw&mode=dashboard&TERRITORY=[“Japan”, “NA”,“Emea”]&STERRITORY=NA&j_organization=organization_name&print=png&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen>
</iframe>
HI v5.0 Onwards
<iframe id="helicalinsight-report-frame" src="https://applicationHost.com:8085/hi-ee/#/report-viewer?dir=Travel_Dashboard&file=travel_dashboard.efwdd&mode=dashboard&TERRITORY=[“Japan”, “NA”,“Emea”]&STERRITORY=NA&j_organization=organization_name&print=png&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen>
</iframe>
where,
TERRITORY: Name of the parameter which is going to be triggered on the Integrated report.
[“Japan”, “NA”,“Emea”]: Value to be applied on TERRITORY parameter.
STERRITORY: name of the parameter which is going to be triggered on the Integrate report.
NA: Value to be applied on STERRITORY parameter.
Here TERRITORY is the multiple select parameter and we have to pass the multiple select parameter values inside square brackets ([ ]) with double quotes and separated with a comma (,) like (TERRITORY=[“Japan”, “NA”,“Emea”]).
You can replace opening square bracket with %5B and closing square bracket with %5D. So it will look like &TERRITORY=%5B“Japan”, “NA”,“Emea”%5D
Here STERRITORY is the single select parameter and we have to pass single select parameter directly as STERRITORY=NA
If you want to pass date or date range as input parameter via URL please refer to the below description.
For date parameter in iframe url you have to pass parameter and its value as date=2003-01-06.
For date range parameter in iframe url you have to pass two parameter as sDate=2016-01-06, eDate=2017-05-31. Sdate means start date and EDate means end date.
NOTE: If you did not pass any parameter then report will open with default parameters which were defined while report creation.
Exporting in pdf/png/jpeg format via URL
Format of Iframe code with export:
<iframe id="helicalinsight-report-frame" src="https://applicationHost.com:8085/hi-ee/hi.html?dir=Travel_Dashboard&file=travel_dashboard.efw&mode=dashboard&TERRITORY=[“Japan”, “NA”,“Emea”]&STERRITORY=NA&j_organization=organization_name&print=png&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen>
</iframe>
Where,
Print: API keyword to trigger Export.
png: Export formats value. You can pass export values as pdf /png / jpg / xls.
In case of any doubt, post your queries on forum