In Lesson 1 of this track we created a page report that contains an order list report tab to show order lists of every month from 2013 to 2014. Now, the sales manager is asking for this same report but with different orders during a specified time. Instead of building a new report about orders in each order date, we will save the page report as a new one and then modify the dataset used by its report to meet the requirements.

to add a Value List field, enter "May 1, 2013 8:00:00 AM" as the prompting value, and "Please input start date:" as the prompting text.
Then click OK.

In this task, we will apply the parameters created above to filter the dataset which is used by the report. Then when we view the new report, a message will prompt for us to specify the parameter values. In this way, we can get data that we need.
button.
.

Parameters can also be used to filter queries to limit their data. However, in this task, we cannot set the filter on the report's query. If we do that, all datasets based on the query will be affected, that is to say, the filter will also be applied to the report created in Lesson 1.
After the steps above, the parameters will take effect when viewing the report by entering values in the Enter Parameter Values dialog.
JReport recognizes that the query is based on the value of two parameters, and therefore prompts for them as follows:


Note: If the report does not look correct, you can compare it to the final version of the report provided by JReport. To do so, you will need to save and close this catalog and then open the JinfonetGourmetJava.cat catalog file located at <install_root>\Demo\Reports\TutorialReports.
Readers of this report can now input any date to get orders with the time they need by using the parameters.
In this lesson we learned how to use parameters to change the dataset of a report dynamically. Parameters collected at runtime determine which records are selected and ultimately displayed in the report results.
