Add Scripts to a Report
Advanced Users can use the Cherwell Script Wizard to run scripts on a Report for items that are not included in the Report Designer interface.
There are currently seven scripts available in the Script Wizard:
- Change Field Color Based On Value: This script can be used to set the color of a Field show on the Detail band, including related Fields. In addition, you can use operators such as Between, Between Inclusive, Like, and Empty.
- Chart Shown on Detail Report - Limit to Detail Report Data: This script can be used to restrict the data displayed in a chart on a Detail Report to that of the Detail Report group.
- Chart Shown On Group - Limit to Group Data: This script can be used to restrict the data displayed in a chart on a Group Header or Footer to that of the Group Header/Footer instead of using data from the entire Report.
- Drill Down - Hide/Show Detail Report: This script can be used to show or hide the Detail Report when clicking a particular Field on the Master Report, giving the appearance of drilling down into the Detail Report from the Master Report.
- Drill Down - Hide/Show Particular Fields: This script can be used to show or hide particular Fields on the Detail band when clicking the hyperlinked Field. For example, you can initially hide the Description Field, and then show the Description Field upon clicking Incident_ID.
- (Advanced) Group Summary - Create a Custom Summary: This script can be used to create three event handlers needed in order to implement custom summary functions.
- Group Summary - Show a Percentage: This script can be used to take the ratio of two Fields from the Group Summary band and show them as a percentage. For example, if you have Total Incidents and Incidents Reported by Phone, you can create a third Field that shows Percentage of Incidents Reported by Phone.
If scripts are disabled for Reports for your CSM system, you may receive an error when you run a Report that contains a script. See Configure Miscellaneous Settings for Web Applications.
Adding a Script Using the Script Wizard
Good to know:
- Scripts only show in the Script Wizard if the items they relate to are present in the Report. For example, chart scripts only become available if there is a chart in the Group Header or Detail Report band.
- Added scripts can be viewed in the Scripts tab.
To add a script to a Report using the Script Wizard:
- Open a Report in the Report Designer
- In the Action toolbar, click the Scripts button.
The Script Wizard opens.
- Select a script to add, and then click Next.
- Define script properties:
Previewing a Script
To preview a Report script:
- Add the script to the Report.
- In the View toolbar, click the Preview button to switch the view to Preview.
Results for the applied scripts show in the Report as the User has designed them.