Hide and show input controls based on Radio button click in jasper server
Prerequisites : Jasper Server 6.4.2
Database :Foodmart
Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.
In this blog we will learn how we can hide and show input controls based on Radio button clicking in a Jasper report.
Step 1: Created a Sample Report which has 3 input controls
- Group on –>Radio Button
- Groups –> Multi select
- Users –>Multi select
Expected Result:
When user click on Group button Group input controls should be visible,if user click on Users button User Input Control should be visible and finally user click on None nothing would be visible
Actual Result:

Step 2 :Created a Java Script file and handle the Hide and Show input controls on Radio button clicking i.e., Groups and Users Input control

Step 3: This script file we need to save and paste in below location
<root folder>\jasperreports-server-6.4.2\apache-tomcat\webapps\jasperserver-pro\WEB-INF\jsp\modules\inputControls\OptionalSample.jsp

Step 4: Give the Java Script file path to Report
Right Click on Report–>Edit–>Controls & Resources

Make data easy with Helical Insight.
Helical Insight is the world’s best open source business intelligence tool.
Output:
Clicked on Group and Groups input control is visible

Clicked on Users and Users input control is visible

Clicked on None no any input control is visible

Thanks,
Satya Gopi Parisa,
Bi Developer.
Free Open Source BI Platform

- AI-Powered Analytics
- Embedded Analytics
- Single Sign-On (SSO)
- Multi-Tenancy
- Paginated Canned Reporting
- Interactive Dashboard
- White Labeling