Search code examples
jasperserver

How to disable back button on report?


I am accessing report using URL like in example:

http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Finteractive&reportUnit=%2Freports%2Finteractive%2FCustomersReport

I have also added custom theme to hide JasperServer decorators by folowing link: http://community.jaspersoft.com/wiki/embedding-ad-hoc-http-api

The only problem I am facing is when user click on Back button, they are exiting the report and they can see list of reports in repository. I would like to disable that behavior so that Back button just does nothing in that case. I have tried to customize the behavior as described in: http://community.jaspersoft.com/wiki/setting-default-flow-action-back-button but I can't find the proper value to replace the default action:

<end-state id="done" view="flowRedirect:searchFlow?lastMode=true" />

I have tried replacing it with

    <end-state id="done" view="json:none" />

but that gave me some crazy error.

Hiding button by CSS is not a option since I need the back button to work when user is viewing sub-reports.


Solution

  • I did this issue for Input Control form button.

    Under "...\apache-tomcat\webapps\jasperserver\WEB-INF\jsp\modules\viewReport" directory, in ViewReport.jsp file, I searched for "ICDialog" text and deleted related statements with ICDialog. Then I restarted the jasperserver by "servicerun.bat" and "servicerun.bat START" commands.

    I think, this will work for back button and the others.