Jump to content
We've recently updated our Privacy Statement, available here ×
  • How to hide save button in the report viewer


    Friendly User
    • Features: Reports, User Interface Version: v7.2, v7.1 Product: JasperReports® Server

    Scenario:

    You want to hide the save button from the report viewer in JasperServer so that users cannot re-save the report. How to do that?


    Solution:

    to remove the save buttons you can do the following:

    1. Edit the /jasperserver-pro/WEB-INF/jsp/modules/viewReport/viewReport.jsp

    2. Find the following block:

      <li class="node">
      <ul class="list buttonSet">
      <c:if test="${isPro}">
      <li class="leaf"><button id="fileOptions" class="button capsule mutton up first" aria-label="<spring:message code="button.save"/>" data-title="true" disabled="true"><span class="wrap"><span class="icon"></span><span class="indicator"></span></span></button></li>
      </c:if>
      <c:if test="${!isPro}">
      <li class="leaf"><button id="fileOptions" class="button capsule mutton up first" aria-label="<spring:message code="button.save"/> - <spring:message code="feature.pro.only"/>" data-title="true" disabled="true"><span class="wrap"><span class="icon"></span><span class="indicator"></span></span></button></li>
      </c:if>
      <li class="leaf"><button id="export" class="button capsule mutton up last" disabled="disabled" aria-label="<spring:message code="button.export"/>" data-title="true"><span class="wrap"><span class="icon"></span><span class="indicator"></span></span></button></li>
      </ul>
      </li>
    3. Comment out the following:

      <li class="leaf"><button id="fileOptions" class="button capsule mutton up first" aria-label="<spring:message code="button.save"/>" data-title="true" disabled="true"><span class="wrap"><span class="icon"></span><span class="indicator"></span></span></button></li>
      
      <li class="leaf"><button id="fileOptions" class="button capsule mutton up first" aria-label="<spring:message code="button.save"/> - <spring:message code="feature.pro.only"/>" data-title="true" disabled="true"><span class="wrap"><span class="icon"></span><span class="indicator"></span></span></button></li>
    4. Save and restart.

    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...