Hide Show Input Controls on Radio Button Click in Jasper Report

Posted on by By Satya Gopi, in Business Intelligence, Jaspersoft | 0

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.

Click Here to Free Download

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

  1. Group on –>Radio Button
  2. Groups –> Multi select
  3. 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.

Grab The 30 Days Free Trail

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

 

logo

Best Open Source Business Intelligence Software Helical Insight is Here

logo

A Business Intelligence Framework

Thanks,

Satya Gopi Parisa,

Bi Developer.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments