Report printing method and system based on HTML (Hyper Text Markup Language) template

A report and template technology, applied in the computer field, can solve the problems of not being able to meet the actual requirements, not suitable for communication, poor maintainability, etc., and achieve the effect of shortening the development cycle, reducing development costs, and reducing difficulty

Inactive Publication Date: 2015-04-29
BEIJING CED RAILWAY ELECTRIC TECH
View PDF3 Cites 26 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] For some factory products, before leaving the factory, it is necessary to perform test verification on special test equipment, record test data, and print test reports; this requires control software that can test records and dynamically print test reports. These data are mostly non-structural small amounts of data, and Due to different product models and customers, the printing content and layout are also different. During program development, the layout is printed at a fixed position. When the printing layout is changed, the program needs to be rewritten. The maintainability is poor and cannot meet the actual requirements.
Generally, the test equipment program does not use a database at the back end, and the amount of data is small; in addition to the report display and printing function, the main function of the test equipment program is the operation control of the equipment. The special report control used in the program is too bloated, and the report style of the special control is changed. When using special template editing software, you need to re-learn and familiarize yourself with it; moreover, most template files are in a dedicated format, which is not suitable for dissemination and communication

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Report printing method and system based on HTML (Hyper Text Markup Language) template
  • Report printing method and system based on HTML (Hyper Text Markup Language) template
  • Report printing method and system based on HTML (Hyper Text Markup Language) template

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0038] figure 1 It is a flowchart of a report printing method based on an HTML template provided by Embodiment 1 of the present invention. like figure 1 As shown, the method mainly includes the following steps:

[0039] Step 11. Create an HTML template file according to the presentation requirements of the report. The template language is embedded in the HTML template file, and includes the template file and a CSS file for storing display styles and configuration information; wherein, according to the rules of the template language, the The dynamic content part is embedded into the template file in the form of variables to form the template file.

[0040] Specifically, HTML is a common markup language on the Web, which stores structured content in the form of text. In order to facilitate later maintenance, following the principle of separation of content and style, CSS style sheets are used to control the display style of reports; for example, information such as color, fon...

Embodiment 2

[0075] Figure 4 It is a schematic diagram of an HTML template-based report printing system provided by Embodiment 2 of the present invention. Such as Figure 4 As shown, the system mainly includes:

[0076] The HTML template file creation module 41 is used to create an HTML template file according to the presentation requirements of the report. The template language is embedded in the HTML template file, and includes a template file and a CSS file for storing display styles and configuration information; wherein, according to the template The language rule embeds the dynamic content part in the report into the template file in the form of variables to form the template file;

[0077] A dynamic data acquisition module 42, configured to acquire the dynamic data required to generate the report;

[0078] Standard HTML file generation module 43, for adopting mapping dictionary to realize the replacement of dynamic data and corresponding variable, generate standard HTM...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a report printing method and a report printing system based on an HTML (Hyper Text Markup Language) template. The related method comprises the following steps: creating an HTML template file according to a presentation requirement of a report, wherein a template language is embedded into the HTML template file, and the HTML template file contains a template file and a CSS (Cascading Style Sheet) file used for storing a display style and configuration information; embedding a dynamic content part in the report into the template file in a variable form according to a template language rule to form the template file; acquiring dynamic data needed by the generation of the report; replacing the dynamic data with corresponding variables by adopting a mapping dictionary to generate a standard HTML file; rendering the standard HTML file by utilizing a layout engine to generate the corresponding report; outputting the report according to the configuration information in the CSS file, and printing the report. According to the method and the system disclosed by the invention, a template-based dynamic printing function can be achieved, and the development cost and the post-maintenance cost are reduced.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a report printing method and system based on an HTML template. Background technique [0002] No matter in the field of office or factory production, report printing is the most common daily work. For simple and static content, Microsoft Word and Microsoft Excel can be used as report making and printing tools; while reports with big data and dynamic content, such as finance and materials, use special components or controls to realize report generation based on the database system. Generate and print. Typical controls mainly include Crystal Reports, FastReport, FineReport, KD Reports, etc. The whole system is quite large and professional. [0003] For some factory products, before leaving the factory, it is necessary to perform test verification on special test equipment, record test data, and print test reports; this requires control software that can test records and dynamica...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F3/12G06F17/30
Inventor 刘宏业戴永亮刘志华
Owner BEIJING CED RAILWAY ELECTRIC TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products