Question about generating HTML reports using IReport and JasperReport

Source: Internet
Author: User

  Ireport And Jasperreport Generate Html Report ProblemsI recently developed a J2EE-based Web project that uses ireport and jasperreport as a Web Report solution. The following problems occur when HTML reports are used for printing.
1. Problem description: After an HTML report is generated using jasperreport, the data is displayed correctly, Various lines cannot be displayed. (If Chinese characters cannot be displayed, see ireport and jasperreport.
Cause: When an HTML page is generatedJrhtmlexporterparameter. Images_uriIncorrect Parameter settings, mainly due to image Path Problems
Solution:GenerateHtmlThe page can be configured as follows::
Exporter.Setparameter(Jrhtmlexporterparameter. Images_ur, "/Reports/image? Image = ");
/Report/is the directory where the image is located. The image name is "image" without an extension. It has been tested for a long time and it is ineffective to set it to other attributes, you can rename the PX file generated when ireport generates HTML and put it in the/reports/directory.
2. Problem description: After using jasperreport to generate an HTML report, useIEPrintReportVarious lines cannot be printed
Cause: in fact, when jasperreport generates HTML, those lines are a PX-pixel image built in the jasperreports package and displayed in the form of images during ie display, when printing, the browser cannot print these images.
)

Print the background color and image, and preview again to display various lines. ÀPrintÀAdvancedÀInternet OptionsÀ solution:SetIE optionsTo print the background color and image. Method: Tool
3. Problem description: when designing a Report Template Using ireport, the standard A4 paper is used,GenerateExcel and PDF are displayed correctly, InGenerateHTML fileThe entire reportMuch smaller than the original size(Complete data display). All data is displayed on one page,Paging unavailable.
Solution: the solution has not been properly solved. Please advise!

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.