Requirement:
When scheduling reports in JasperReports® Server web UI, the option to output to the repository is checked. User wants this option to be unchecked as the default setting.
Resolution:
Javascript file user will need to modify is "jobModel.js" file under jasperserver-uicejrs-uisrcschedulermodel directory.
Change the setting for createFromUri.repositoryDestination class mutator from saveToRepository: true to saveToRepository: false
Save the change and test the script.
The JavaScript source code is customized to improve performance.
To test modified JavaScript follow the chapter 5.2.3 in the JasperReports Server Ultimate Guide and also refer to this
In an nutshell, to customize the Javascript:
1. Create a working directory where you can extract sources from the JasperReports Server source bundle zip file (TIB_js-jrs__src.zip).
2. Download and install node.js from http://nodejs.org/ (version 10.x.x+ is required).
3. Install yarn (version 1.22.x is required).
4. Run the following commands to install node modules. • cd jasperserver-ui/pro • yarn install
5. Make your changes to the JavaScript source code.
6. Run the following commands to build the final bundled static assets. • cd jasperserver-ui/pro/jrs-ui-pro • yarn run clean • yarn run build Bundled static assets will be placed in the jrs-ui/build/overlay/scripts folder.
7. Back up scripts folder of your JasperReports Server instance deployment. For example, /webapps/jasperserver-pro/scripts folder, when Apache Tomcat is used.
8. Delete the content of the scripts folder of your JasperReports Server instance deployment. For example, /webapps/jasperserver-pro/scripts folder.
9. To deploy bundled static assets (build result) to the JasperReports Server instance, copy the content of jrsui-pro/build/overlay/scripts folder to the scripts folder of your JasperReports Server instance deployment. For example, /webapps/jasperserver-pro/scripts folder.
10. No need to restart the server, clear the cache and test your changes.
TTC-20180821
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 accountSign in
Already have an account? Sign in here.
Sign In Now