Changing Default Save Folder for Adhoc Views in Jasper

Posted on by By Satya Gopi, in Jaspersoft | 0

Prerequisites: Jasper 6.4.0 Enterprise

Database: Foodmart

Here we can see how we can change the Default Save Folder path for ad-hoc views.

If we need to choose a dynamic path, like logged user folder name as the default location, for this we need to modify a JSP file (WEB-INF/jsp/modules/Adhoc/adHocScriptHeader.jsp)

Here we need to add a Tag and update the Save Folder Path

<%@ taglib uri="http://www.springframework.org/security/tags" prefix="authz"%> <%--Add this line near the top to obtain access to the authentication object which contains user info--%>
 
var saveFolder = "/Users/<authz:authentication property="principal.username"/>";  //Modify this variable to use whatever value appropriate.

Before Update the Path:
default Save Folder

After the Dynamic Path updated:
default save folder after update

Now the ad-hoc view will show the default path as User name which logged into, I have logged into Helical user and the ad-hoc view will save in Helical Folder.

In case if you have any queries please get us at support@helicaltech.com

Thank You
Satya Gopi
BI Developer
Helical IT Solutions Pvt Ltd

logo

Best Open Source Business Intelligence Software Helical Insight Here

logo

A Business Intelligence Framework


logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments