CN113255314B - Configurable report template system implementation method, electronic equipment and storage medium - Google Patents

Configurable report template system implementation method, electronic equipment and storage medium Download PDF

Info

Publication number
CN113255314B
CN113255314B CN202110771169.7A CN202110771169A CN113255314B CN 113255314 B CN113255314 B CN 113255314B CN 202110771169 A CN202110771169 A CN 202110771169A CN 113255314 B CN113255314 B CN 113255314B
Authority
CN
China
Prior art keywords
report
template
control
implementation method
system implementation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110771169.7A
Other languages
Chinese (zh)
Other versions
CN113255314A (en
Inventor
胡建恺
黄晖
彭成淡
崔文华
黄垚波
黄泽彬
李进杰
李伟滨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GUANGDONG INSTITUTE OF SPECIAL EQUIPMENT INSPECTION AND RESEARCH ZHONGSHAN BRANCH
Original Assignee
GUANGDONG INSTITUTE OF SPECIAL EQUIPMENT INSPECTION AND RESEARCH ZHONGSHAN BRANCH
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by GUANGDONG INSTITUTE OF SPECIAL EQUIPMENT INSPECTION AND RESEARCH ZHONGSHAN BRANCH filed Critical GUANGDONG INSTITUTE OF SPECIAL EQUIPMENT INSPECTION AND RESEARCH ZHONGSHAN BRANCH
Priority to CN202110771169.7A priority Critical patent/CN113255314B/en
Publication of CN113255314A publication Critical patent/CN113255314A/en
Application granted granted Critical
Publication of CN113255314B publication Critical patent/CN113255314B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets

Abstract

The invention provides a configurable report template system implementation method, which comprises the following steps: rewriting a control container and a control, adding a custom attribute and a formula resolver, and distinguishing report templates by version numbers; combining the designed report templates into a complete report, and fixing the report type name; after the report type is bound with the service, when the report is opened, the latest version template is loaded or the old report is reused, the template control binding property is deserialized into a control, an input rule is determined, or XML and HTML conversion is carried out, the report is output, and the report is printed according to the page direction, the control position, the size and the content. The invention relates to an electronic device and a storage medium for executing a configurable report template system implementation method. The invention adopts C/S architecture design, configures the rapid design report through the report template, and can complete the compilation of various complex special equipment reports only by adding, deleting, dividing and combining tables and configuring.

Description

Configurable report template system implementation method, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of report templates of information systems of special equipment, in particular to a configurable report template system implementation method, electronic equipment and a storage medium.
Background
The information system of the special equipment mainly has the function of issuing a detection report, and the production of the report is also a key link of each system. Because the variety of the special equipment is various, part of reports are complex, and some reports even need to be operated by formulas, the convenience and reliability of the report template become the key of the information system of the special equipment. In a traditional development mode, third party development software is generally combined with a report designer, a database and the like for development, and the mainstream development software is developed by combining C #, java and the like with report design tools Fastreport, CrystalReports and the like, so that the following problems exist:
1. all tables need to be written by complex codes such as manual drawing, picture editing frames, dynamic page loading, formula operation, report itemized authority control, data statistics and the like;
2. the report design is only the format of the data display and the format of the template are changed, all reports change along with the change no matter whether the reports are new or old, the reports are different from one another, and the requirements of a quality management system are violated;
3. templates made by the report design tool generally do not have an editing function, or a complex code is required to be written to finish a simple editing function.
Therefore, the project development period is often longer, developers are required to master development languages skillfully, and the requirements on the developers are higher, so that the project capital investment is increased, and the later maintenance workload is correspondingly increased.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide a configurable report template system implementation method, which adopts C/S architecture design, configures a rapid design report through a report template, and can finish the compilation of various complex special equipment reports only by adding, deleting, dividing and combining tables and configuring.
The invention provides a configurable report template system implementation method, which comprises the following steps:
designing a template, rewriting a control container and a control, adding a custom attribute and a formula analyzer, and distinguishing the report template by a version number;
assembling templates, namely combining the designed report templates into a complete report and fixing the report type name;
generating a page, loading a latest version template or multiplexing an old report when the report is opened after the report type is bound with the service, deserializing the template control bound attribute into a control, determining an input rule, or acquiring XML data of the report through an interface, reading each XML element in the XML data in a traversing manner, selecting a corresponding HTML element according to the read attribute and content of each XML element, and analyzing and presenting the attribute and content of the XML element;
report output and printing, report output, report printing according to page direction, control position, size and content.
Further, in the template design step, a table, a label, a text box and a picture box control are rewritten.
Further, in the template design step, the Panel control is rewritten, and an OnPaint control redrawing method is combined to obtain an A4 page format with a white background which can be vertical or horizontal.
Further, in the template assembling step, the designed report templates are assembled into a complete report in a fixed order, one report template can be used by a plurality of reports, and a plurality of pages can be added to one report.
Further, in the page generating step, the latest version of the template is loaded or the old report is reused by using an deserialization method.
Further, in the page generating step, the template control binding input, output, formula, position and alignment properties are deserialized into a control.
In the report output and printing step, the field name of the output comparison data table is set according to the control, and the comparison data table is stored in the data table when the report is stored.
Further, in the report outputting and printing step, the position, the size and the content of the control are printed in the page direction by using PrintPreviewDialog and GDI +.
An electronic device, comprising: a processor;
a memory; and a program, wherein the program is stored in the memory and configured to be executed by the processor, the program comprising instructions for performing a configurable report template system implementation method.
A computer readable storage medium having stored thereon a computer program for execution by a processor of a configurable report template system implementation method.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a configurable report template system implementation method, which adopts C/S architecture design, configures a rapid design report through a report template, can complete the compilation of various complex special equipment reports only by adding, deleting, dividing and combining tables and configuring, and has the following characteristics:
the data binding, formula operation, upper and lower mark display, report itemization, data statistics and the like do not need to compile complex codes;
the user can design reports in various formats only by simple dragging action; the single report page can be managed, a series of equipment inspection reports can be freely assembled, the sharing function of the report template is completely realized, meanwhile, the problem that one inspection report module corresponds to a plurality of inspection report templates is solved, and a large amount of module development time is saved;
the convenient multiplexing mechanism can rapidly carry out the overall migration of the report module through simple export and import;
the data collection function is used, when a user designs various reports, the user can perform field binding on the text box, set which data table to output to, and perform secondary analysis on the data by using the self-defined report function of the system in the later period;
the report approval level number can be set, various report requirements such as itemized reports, formula calculation in reports, picture insertion, free combination of different report pages, PDF conversion, electronic endorsements and the like are supported, and the report approval system is flexible and convenient;
and analyzing the template XML with the attribute into an HTML page to realize report input of a WEB end and a mobile end.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical solutions of the present invention more clearly understood and to implement them in accordance with the contents of the description, the following detailed description is given with reference to the preferred embodiments of the present invention and the accompanying drawings. The detailed description of the present invention is given in detail by the following examples and the accompanying drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a configurable report template system implementation of the present invention;
FIG. 2 is a flow chart of a configurable report template system implementation method according to an embodiment of the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
The special equipment comprises elevators, hoisting machinery, special motor vehicles in factories, passenger transport ropeways, large amusement facilities, boilers, pressure vessels, pressure pipelines, pressure pipeline elements, safety accessories and the like, and each equipment can be subjected to supervision inspection, periodic inspection, different entrusted inspection services and the like, and different report templates are required to be configured, so that the flexible and convenient report template design can be greatly helpful for system application and maintenance. The report template design is designed aiming at the characteristics of the special equipment inspection and detection report, the design that an actual page is seen is simulated, C # winform is used as a design language, the report control presentation is reconstructed by combining a basic control (Devexpress control), the report control presentation is stored from an entity control to an xml format, and the report control presentation is analyzed into the entity control, filled, output and printed in the whole process. Specifically, a configurable report template system implementation method, as shown in fig. 1-2, includes the following steps:
the template design can be designed into a single page or multiple pages according to actual conditions. The method specifically comprises the following steps:
and (3) constructing a page: rewriting PanelControl, wherein PanelControl is a control container, and combining a control redrawing method: OnPaint enables the page to be in a A4 page format with a white background and longitudinal and transverse directions, and content controls can be dragged, dropped and positioned at will;
page control: controls such as tables, labels, text boxes, picture boxes and the like are rewritten, custom attributes are added, and quick retrieval and output are facilitated;
calculating by the formula: a formula resolver is added to realize inverse wave blue type compiling, so that control values can be operated in a linkage manner;
version control of the template: report templates are distinguished by version numbers, with later updated versions not affecting older versions.
Assembling templates, namely combining the designed report templates into a complete report in a fixed sequence and fixing the name of the report type; one report template may be used for multiple reports and multiple pages may be added to one report.
Page generation, including loading and filling of report pages: after the report type is bound with the service, when the report is opened, a deserialization method is used for loading the template with the latest version or reusing the old report, on the premise that the versions do not conflict, the template control rule is as follows: binding property deserialization control elements such as input, output, formulas, positions, alignment and the like, and determining an input rule;
or acquiring XML data of the report through an interface, traversing and reading each XML element in the XML data, selecting the corresponding HTML element according to the read attribute and content of each XML element, analyzing and presenting the attribute and content of the XML element, and finally analyzing the XML data into an HTML page, thereby realizing report entry of a WEB end and a mobile end.
Output of the report: setting the field name of the output comparison data table according to the control, and storing the field name in the data table when the report is stored, so that the report can be conveniently formulated later;
report printing: the method uses PrintPreviewDialog and GDI + in page direction, wherein the PrintPreviewDialog control is used for displaying the appearance of a printed document, and the GDI is an abbreviation of a Graphics Device Interface and means a graphic Device Interface, and the main task of the Interface is to take charge of information exchange between a system and a drawing program, process graphic output of all Windows programs, control position, size and content printing.
An electronic device, comprising: a processor;
a memory; and a program, wherein the program is stored in the memory and configured to be executed by the processor, the program comprising instructions for executing a configurable report template system implementation method.
A computer readable storage medium having stored thereon a computer program for execution by a processor of a configurable report template system implementation method.
The foregoing is merely a preferred embodiment of the invention and is not intended to limit the invention in any manner; those skilled in the art can readily practice the invention as shown and described in the drawings and detailed description herein; however, those skilled in the art should appreciate that they can readily use the disclosed conception and specific embodiments as a basis for designing or modifying other structures for carrying out the same purposes of the present invention without departing from the scope of the invention as defined by the appended claims; meanwhile, any changes, modifications, and evolutions of the equivalent changes of the above embodiments according to the actual techniques of the present invention are still within the protection scope of the technical solution of the present invention.

Claims (9)

1. A configurable report template system implementation method is characterized by comprising the following steps:
designing a template, rewriting a control container and a control, adding a custom attribute and a formula analyzer, and distinguishing the report template by a version number;
assembling templates, namely combining the designed report templates into a complete report and fixing the report type name;
generating a page, loading a latest version template or multiplexing an old report when the report is opened after the report type is bound with the service, deserializing the template control bound attribute into a control, determining an input rule, or acquiring XML data of the report through an interface, reading each XML element in the XML data in a traversing manner, selecting a corresponding HTML element according to the read attribute and content of each XML element, and analyzing and presenting the attribute and content of the XML element;
outputting and printing a report, outputting the report, and printing the report according to the page direction, the position, the size and the content of the control;
in the template design step, PanelControl is rewritten, and an OnPaint control redrawing method is combined to obtain an A4 page format with a white background which can be vertical or horizontal.
2. A configurable report template system implementation method according to claim 1, characterized by: in the template design step, tables, labels, text boxes and picture box controls are rewritten.
3. A configurable report template system implementation method according to claim 1, characterized by: in the template assembling step, the designed report templates are combined into a complete report in a fixed sequence, one report template can be used by a plurality of reports, and a plurality of pages can be added in one report.
4. A configurable report template system implementation method according to claim 1, characterized by: in the page generating step, a latest version template or an old report is reused by using an deserialization method.
5. A configurable report template system implementation method according to claim 1, characterized by: in the page generation step, the binding input, output, formula, position and alignment properties of the template control are deserialized into the control.
6. A configurable report template system implementation method according to claim 1, characterized by: in the report output and printing step, the field name of the output comparison data table is set according to the control, and the comparison data table is stored in the data table when the report is stored.
7. A configurable report template system implementation method according to claim 1, characterized by: in the report outputting and printing step, the PrintPreviewDialog and the GDI + are used for printing according to the page direction, the position, the size and the content of the control.
8. An electronic device, characterized by comprising: a processor;
a memory; and a program, wherein the program is stored in the memory and configured to be executed by the processor, the program comprising instructions for carrying out the method according to any one of claims 1-7.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program is executed by a processor for performing the method according to any of claims 1-7.
CN202110771169.7A 2021-07-08 2021-07-08 Configurable report template system implementation method, electronic equipment and storage medium Active CN113255314B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110771169.7A CN113255314B (en) 2021-07-08 2021-07-08 Configurable report template system implementation method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110771169.7A CN113255314B (en) 2021-07-08 2021-07-08 Configurable report template system implementation method, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113255314A CN113255314A (en) 2021-08-13
CN113255314B true CN113255314B (en) 2021-10-12

Family

ID=77191053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110771169.7A Active CN113255314B (en) 2021-07-08 2021-07-08 Configurable report template system implementation method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113255314B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116522892B (en) * 2023-07-03 2023-12-19 广东省特种设备检测研究院中山检测院 Automatic generation method and generation system of report template

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838740A (en) * 2012-11-21 2014-06-04 方欣科技有限公司 Report engine method
CN104281447A (en) * 2014-09-01 2015-01-14 国家电网公司 Report form fast generating and issuing system and method
CN104899194A (en) * 2014-01-09 2015-09-09 武汉联影医疗科技有限公司 Creating method of medical report on the basis of HTML (Hypertext Markup Language) 5
CN111046046A (en) * 2019-12-17 2020-04-21 南京富士通南大软件技术有限公司 Customizable automatic driving daily newspaper generation system and method
CN112652371A (en) * 2020-12-30 2021-04-13 湖南长城医疗科技有限公司 A nursing document designer and generate device for wisdom medical field

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630747A (en) * 2015-12-29 2016-06-01 武汉瑞得软件产业有限公司 Inspection report specialization system and method applied to special device industry
CN110032720A (en) * 2018-12-28 2019-07-19 万康源(天津)基因科技有限公司 A kind of visualization report typesetting and automatic generation method and system based on XML
CN110321539A (en) * 2019-06-26 2019-10-11 成都科鸿智信科技有限公司 A kind of special equipment supervising platform report tool

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838740A (en) * 2012-11-21 2014-06-04 方欣科技有限公司 Report engine method
CN104899194A (en) * 2014-01-09 2015-09-09 武汉联影医疗科技有限公司 Creating method of medical report on the basis of HTML (Hypertext Markup Language) 5
CN104281447A (en) * 2014-09-01 2015-01-14 国家电网公司 Report form fast generating and issuing system and method
CN111046046A (en) * 2019-12-17 2020-04-21 南京富士通南大软件技术有限公司 Customizable automatic driving daily newspaper generation system and method
CN112652371A (en) * 2020-12-30 2021-04-13 湖南长城医疗科技有限公司 A nursing document designer and generate device for wisdom medical field

Also Published As

Publication number Publication date
CN113255314A (en) 2021-08-13

Similar Documents

Publication Publication Date Title
US8321834B2 (en) Framework for automatically merging customizations to structured code that has been refactored
US8286132B2 (en) Comparing and merging structured documents syntactically and semantically
Baranowski et al. Verifying Rust programs with SMACK
CN106371829A (en) Modularization thinking-based template framework design method and system
EP1818835A1 (en) Document processing device, and document processing method
CN112711408A (en) Vue componentization-based visualization configuration rendering method, system and terminal
Pantelic et al. Software engineering practices and Simulink: bridging the gap
US20090077462A1 (en) Document processing device and document processing method
Haghish markdoc: Literate programming in Stata
CN113255314B (en) Configurable report template system implementation method, electronic equipment and storage medium
CN112668290A (en) Dynamic form generation method and system based on gridding design
WO2005098660A1 (en) Document processing device and document processing method
EP1460533A1 (en) Extensible graphical user interface development framework
US20200257507A1 (en) Integration of workflow and logical data objects using visual programming
US20210165726A1 (en) Transferring data from a source complex variable to a target complex variable
CN112686014A (en) Cable number plate compiling system and method
O'Donnell et al. Implementing ATML into an existing software architecture
Arcaini et al. Unified syntax for abstract state machines
Haghish Rethinking literate programming in statistics
Jung Generator-composition for aspect-oriented domain-specific languages
Müller et al. Leveraging cognitive support and modern platforms for adoption-centric reverse engineering (ACRE)
Verma et al. Software Development Engineer in Test: Cognizant Internship
Schrauwen et al. Bachelor’s Thesis Computing Science
Dayan et al. MDA Models and PIM/PSM Transformations Using Extended Automata
Xiong et al. Towards an ontology-based approach for dealing with web guidelines

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant