A simple solution for JSP report printing

Source: Internet
Author: User

1. The style of making reports in Word or Excel.

Excel's Row height and column width units cannot be represented in mm or cm.

needs to be calculated. Under 1024*768, the 1CM is about 38 pixels.

This is the benchmark for calculating and controlling the row and column positions of the report.

2. In Word, set "table--header row repeat."

In Excel, set the file--page Setup--sheet--print title.

3. Save as Web page, change suffix name "htm" as "JSP".

4. Word report file header is:

The Excel report file header is:

5. Define the print parameter variables in the header section of the file as follows (for example, in Excel):

6. After the change <!--[if GTE MSO 9] and <! The content of the XML tag in the [endif]--> tab, mainly setting the dynamic print area (for example, Excel):

7. Other code for JSP.

The following is the main loop print section (for example, in Excel):

8. Test and continue to modify.

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: info-contact@alibabacloud.com 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.