Detailed description of reports generated on the JSP report page

Source: Internet
Author: User
Detailed description of reports generated on the JSP report page

1. Ideas

2. Implementation instance

1. Ideas

First, the user clicks the "generate" button to send the request to the background processing controller. The controller queries the database to obtain the data in the report, and then sends the Request dispatch to the real report page, on the report page, first obtain the data object obtained through the request (generally in the form of a bean), and then bring the data in the object to the page.

2. Implement the instance 2.1 report page

If the original word document of the report exists, there is a simple method to convert the word report to HTML: Compile.

2.2 instance spring + extjs

{Text: 'xxx', iconcls: 'icon-Refresh ', Handler: printtable },

Function printtable () {<br/> window. Open (<br/> 'url', <br/> '_ print' <br/>); <br/>}

The controller sends parameters to the report page:

Request. setattribute ("xxxbeanname", bean); <br/> request. getrequestdispatcher ("print. jsp"). Forward (request, response );

Report page: Get Bean object

Bean = (bean) request. getattribute ("xxxbeanname ");

Real bean attributes:

<% = Ocom. getsubjectname () %>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.