There are various methods of integrating Helical Insight. One of the methods is using object tag 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 object tag has to be included in application or web page. In that object tag, pass the URL of the report or dashboard along with passing the username as well as password as indicated below.
Upto HelicalInsight v4.1GA
object tag code :
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&j_organization=organization_name&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreenmozallowfullscreenallowFullScreen>
</object>
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&j_organization=organization_name&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreenmozallowfullscreenallowFullScreen>
</object>
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 object tag.
To pass the input parameters we have to update URL passed in object tag with parameter name and its value
Format of object tag code with input parameters:
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" webkitAllowFullScreenmozallowfullscreenallowFullScreen>
</object>
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" webkitAllowFullScreenmozallowfullscreenallowFullScreen>
</object>
OR
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=%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" webkitAllowFullScreenmozallowfullscreenallowFullScreen>
</object>
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=%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" webkitAllowFullScreenmozallowfullscreenallowFullScreen>
</object>
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”]).
Instead of square brackets, you can use %5B for [ and %5D for ], 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 object tag url you have to pass parameter and its value as date=2003-01-06.
For date range parameter in object tag 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 object tag code with export:
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&print=png&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreenmozallowfullscreenallowFullScreen>
</object>
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&print=png&j_username=user_name&j_password=login_password" style="height: 100%;width:100%;border:0px;" frameborder="0" webkitAllowFullScreenmozallowfullscreenallowFullScreen>
</object>
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.