Use Case
Customer would like to limit the export formats (PDF, Excel, CSV etc) available for dashlets but couldn't find a way to achieve it.
Resolution
By default, TIBCO JasperReports® Server v.7.1.0 supports the following export formats:
Excel (Paginated)
Excel
RTF
CSV
ODT
ODS
DOCX
XLSX (Paginated)
XLSX
PPTX
Thj list of formats is code in a Javascript file:
webappsjasperserver-proscriptsbower_componentsbi-dashboardsrcdashboardviewbasecomponentViewTraitreportTrait.js
Export formats defined as:
exportOptions = [ { label: i18n['jasper.report.view.hint.export.pdf'], action: 'pdf', params:{outputFormat: "pdf"} }, { label: i18n['jasper.report.view.hint.export.excel'], action: 'excel', params:{outputFormat: "xls"} }, { label: i18n['jasper.report.view.hint.export.excel.nopag'], action: 'excel.nopag', params:{outputFormat: "xls", ignorePagination: true} }, ...
Unfortunately, there is no UI or a config file to limit the list of export formats.
The only way is to change the Javascript file and comment unrequired formats, like
/*** { label: i18n['jasper.report.view.hint.export.excel.nopag'], action: 'excel.nopag', params:{outputFormat: "xls", ignorePagination: true} }, ***/
Please note, that all dashlets will be affected by the changes.
By default, JasperReports Server uses optimized versions of scripts located in folder
webappsjasperserver-prooptimized-scripts
In order to test the changes, you can add ?_opt=false parameter to URL to load non-optimized scripts and check if the changes meet your requirements:
If everything is OK, you should re-generate optimized scripts as described in JasperReports Server Ultimate Guide:
Solution tested with TIBCO JasperReports® Server v.7.1.0
Ref. Case 01667711
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