Deploy jasper reports in JasperReports Server using Parameters
This JasperReports Server tutorial will explain how to control input
parameter in JasperReports Server. To control the inputs parameter we need to specify the parameters in JasperReports Server. This will give you the specific data in the reports.
Let’s start, follow the below steps to Add Input Control in JasperReports Server.
In this example we have added a parameterized report.
Step 1: Design your report with parameter and compile it and make sure there is no compilation error in the report. The query may be like
select * from tbl_test where id=$P{id}
Step 2: Click on the View » Repository and expand the root folder, select Reports folder.
Step 3: Right-click on the Reports folder and go to Add Resource »JasperReports.
Step 4: A new page will open, fill the required details and browse the report (.jrxml file).
Step 5: After filling the details, click on the Controls & Resources tab » Add Input Control….
Step 6: Locate your Input Control
Step 7: Create your Input Control… In this section define the Type of parameter whether it is a single value or multiple values.
Make sure Parameter Name must be same that defined in the report.
Step 8: Define the Datatype of the parameter.
Step 9: Now click on the Data Source tab » Select data source from repository » Browse and select the data source.
Step 10: Finally hit the Submit button then run your report. When you will run your report it will ask the parameter.
Step 11: Here is the output according to the parameter.
Step 12: Done. Thank You:)
Similar Posts
- Maven- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- How to create new role and grant permission to role in JasperReports Server
- IntelliJ IDEA- Enable Multiple Cursors for Editing
- How to customize command prompt in Windows 7?
- IntelliJ IDEA- Import/Open multiple project in single Window