This lesson describes how to run reports from the JReport Server user console. This lesson represents one way that end users could access and run published reports. Reports that are embedded in a Java application would not be accessed from the user console, but instead from the Java application. The interaction with the report itself however would be the same as described here.
The reports you view in this lesson are in the JinfonetGourmetJava folder, which is the folder you published them to in Lesson 2 > Task 1 of this track. Before you can view the reports, make sure you have the Execute and/or Edit permissions on them.
Direct running of reports is to use the default format setting to view the report result. By default, page reports (.cls) are opened in Page Report Studio and web reports (.wls) in Web Report Studio.
In this task, we will run a page report in the JinfonetGourmetJava folder as an example:
Page Report Studio then appears in a separate web browser window, with the report result for the ShipmentDetails report tab in the page report:
When you directly run a report, if the report contains parameters, you will be asked to specify the parameter values. See the next task for details.
As you saw in the Creating a parameter-based report lesson, parameter-driven reports are another way to have a dynamic report. They allow the end users to specify the data that they want to see before the query is issued to the database. By only selecting the data that the report needs, the query is more efficient.
When a parameter-based report is run, JReport Server automatically displays the Enter Parameter Values dialog to prompt the user for the expected values. Default values, if included in the report template definition, are also displayed.
To run the parameter-based report:
A new web browser window opens for you to enter the parameter values. The report template includes start date of May 1, 2015 and end date of June 1, 2015 as default. You can click Submit button to admit these defaults, or you can type new values to view the report. Here we use the default values.
The Advanced Run command allows you to specify additional properties when running a report, for example you can specify a different report format instead of the default one, which can be one of the following: Applet, HTML, PDF, Text, Excel, Postscript, Rich Text Format (RTF) and XML. In this task we will run the report as PDF format.
In this task, the additional options in the Advanced Run page are not used. However these options can be quite useful in real reporting scenarios. For example, you can specify database credentials under which the query should execute, or apply a style group so that the report has a different look.