2. Create a report template.
O determine how the database is connected.
O Customize data summary and statistics in the report template.
O determine the final presentation style.
3. Develop JSP to display logic and business logic.
Realize data extraction, display, printing, export and other functions.
4. Debugging and release. 1. Depending on the calling location, there are two ways to call EOS report:
O call the tag on the JSP page.
O Call the operation logic of EOS report in the business logic.
2. According to the connection mode of the database, it can be divided into:
O JDBC/XML data source.
O EOS data source. Usually, a report is a set of conditional query results. Here are four examples to introduce four different development methods of the same requirement.
User needs are as follows:
Query the user roles and user information in the existing system, and show the user names and user ids corresponding to some roles in the form of reports. You can query the user information corresponding to a role or all roles, and you can print or export the query results to EXCEL.
Case study:
1. Query requirements
O conditional query is required, and the condition is role.
O group display, grouped by role.
O can return result sets in html, applet and excel formats.
2. Key points of realization
O You need to create a conditional query page as the entrance for users to view the report. On this page, you need to select a role and display the format of the results.
O It needs to be displayed in groups, and this function is realized in the report template.
O You need to set the display format, which is done on the results page.
O Data extraction can be realized by calling the report template directly from the result page or calling "presentation logic+business logic" in the background.
3. Table structure and data display
The following three association tables are all eos system tables.
Query SQL statement is as follows:
choose
o.userid,o.operatorname,r.rolename
from
EOSOPERATOR o,
EOSOPERATORROLE eor,
EOSROLE r
where
O.operating = EOR. Operating and
Eor.roleid=r.roleid and
R.rolename, such as "%"
Sort by r.rolename
Step 4 show the results
O query standard page
O query results page