How to define query in JasperReports Server
In this example, we are going to explain how to define the query in JasperReports Server. Most of the time we put all the query in .jrxml file but here we can also define the query in the JasperReports Server.
Defining the query in JasperReports Server is totally independent of report query. You can manage it anytime and modified it according to need.
Check the below steps to define the query.
Note: Do not add the query in .jrxml file.
Step 1: Design your report, compile it and make sure there is no compilation error in the report.
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 Query tab » Click here to create new Query.

Step 6: Fill out the name of your Query and click on Next button.

Step 7: Link the Data Source to the Query.

Step 8: Select the query language and define the Query.

Step 9: Click on the Save » Submit button and run the report.
Step 10: Done. Thank You
References
Similar Posts
- How to increase console buffer size in Eclipse/STS
- IntelliJ IDEA- Enable Multiple Cursors for Editing
- How to import Java Web Project in Eclipse
- IntelliJ IDEA – public static void main shortcut
- How to change default Author and Committer in Eclipse Git plugin?
- Server Tomcat Server at localhost failed to start in Eclipse
- Maven- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- How to change Image background color in Photoshop
- svn: There are unfinished transactions detected
- How to navigate to implementation in IntelliJ IDEA