Requirement:
To change the default visualization type in the Ad Hoc Editor from Crosstab to Table in JasperReports Server
Solution:
1. Download the required version source ZIP from the eDelivery website (for example, TIB_js-jrs_8.0.0_src.zip).
2. Unzip the source file in a working directory, like C:Jaspersoft
3. Locate the DatachooserDialogView.js file (C:JaspersoftJasperReports-Server-8.0.2-srcjasperserver-uiprojrs-ui-prosrcadhocdatachooserview) and open it in an editor.
4. Enter 'table' for the reportType entry of the constructor: function (options) around line 77 of the file (DatachooserDialogView.js file attached for reference), like:
constructor: function (options) { options || (options = {}); this._dfdRenderSerachFormTo = jQuery.Deferred(); var reportType = this._getParameterByName(ADHOC_REPORT_TYPE_PARAM_NAME); reportType = reportType || 'table'; //Default Ad Hoc View data selector to table this.reportType = reportType === 'chart' ? 'ichart' : reportType; this.decorate = this._getParameterByName(DECORATE_PARAM_NAME) || 'yes'; this.isEmbeddedDesigner = this._getParameterByName(IS_EMBEDDED_DESIGNER_PARAM_NAME);
5. Save the file.
6. Finally, to reflect the JavaScript source code customization on the UI we need to build the scripts using the newer Webpack approach. For complete steps on how to build the scripts, please see the section 5.2.3, "Customizing JavaScript Source Code" from our Ultimate Guide:
https://docs.tibco.com/pub/js-jrs/8.0.2/doc/pdf/TIB_js-jrs_8.0.0_Ultimate-Guide.pdf?id=13
Alternatively, you can also watch the below Dr.Jaspersoft video on instructions for building scripts with Webpack:
Further read:
How to change the default visualization type in the Ad Hoc Editor from Crosstab to Table in JasperReports Server 7.9.x and older
https://community.jaspersoft.com/wiki/how-change-default-visualization-type-ad-hoc-editor-crosstab-table-jasperreports-server-79x-and
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