How to display the current date by default when the query condition of the date of the drying report is entered for the first time?

I believe that many projects have used the run dry report to output data, thanks to its powerful functions!

There is such a requirement:

When the amount of data is large, in order to reduce the I/O pressure of reports and databases, we generally default to a query condition. For example, when the query condition is a date, only the data of the current date is queried by default, which will greatly reduce various aspects. Computing pressure!

The default query condition can be directly spliced ​​with the and statement of SQL in the data source part (data acquisition class) by default, and the @ parameter name is used in the foreground to set it. In this way, although the requirements are met, the query conditions displayed in the front end are still empty, and the user experience is not very good. If the front end does not display the current system date. There will be some misunderstandings for users

How to display the current date by default when the query condition of the moisturizing report is a date?

How to display the current date by default when the query condition of the moisturizing report is a date?

solution:

Use the @ parameter name in the front-end query condition template to set as shown in the figure above. This is the grammar rule provided by Rungan, but even with this setting, the system date of the current day will not be loaded when entering the report for the first time.

At this time, you should check whether the template part of the query condition is also set with the required data set (as shown in the figure below), that is, the template part of the query condition and the template part of the query result are both set to the data set, so that you can pass the @ parameter name way to get the parameter value of the default setting in the background!

Reference steps: Configuration->Dataset->Add->Custom->Data Source (java class for obtaining data)

How to display the current date by default when the query condition of the moisturizing report is a date?

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325504673&siteId=291194637