Dynamic editable report generation method based on WPS secondary development

By using bookmark placeholders and template feature trees in WPS documents, the problem of cumbersome production of report generation templates and difficult factor customization is solved, and rapid generation and personalized reports are achieved, improving user experience and configuration efficiency.

CN118917289APending Publication Date: 2024-11-08NANJING RES INST OF ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411013840.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

The production of report generation templates in the existing combat command system is cumbersome, and it is impossible to personalize the reporting elements, resulting in a cumbersome report generation process and poor user experience.

Method used

Using the dynamic editable report generation method based on WPS secondary development, by adding bookmark placeholders to WPS documents, loading and editing template feature trees, customizing report templates according to business needs, and replacing intelligence truth value with bookmark placeholders Generate report file in .

Benefits of technology

It realizes the rapid, accurate and intuitive generation of reports, simplifies the template entry process, supports highly personalized settings and data management, improves users' personalized report generation capabilities, and has structural stability, scalability and operability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917289A_ABST
    Figure CN118917289A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of information comprehensive processing, and discloses a dynamic editable report generation method based on WPS secondary development. The method comprises the steps of template content input, template element loading, template element customization, template generation, report generation, report preview and report storage. A basic report management and generation template in a localization framework is provided, and the WPS report is generated according to the set template and elements. Different WPS report templates can be selected, different element generation reports can be set according to service requirements, and report element visual online editing and report template intelligent generation are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the technical field of comprehensive intelligence processing, and in particular to a method for generating a dynamic editable report based on WPS secondary development. Background Art

[0002] In the military field, it is very common to use the analysis results and various data in the combat planning process to dynamically generate various report files and upload them. These reports usually have large data volumes, multiple data presentation forms and complex logical structures. Existing combat command systems usually use programming interface technology that calls Word or WPS to automatically generate documents by calling templates.

[0003] The article "WORD Document Generation Method under Qt Framework" in the October 2015 issue 10 of Volume 32 of the journal "Computer Applications and Software" designed a method for automatically outputting Word from a program under the Qt framework; the article "Fast Generation Method of Complex Documents Based on Word Templates" in the October 2020 issue 10 of the same journal implemented the dynamic generation of Word documents based on the OOXML specification and designed a set of template instructions to create document templates. However, the template automatic generation technology of the above-mentioned existing research is not yet mature, the production process is not flexible and fast enough, the report template cannot be customized and edited, and the personalized customization of report elements cannot be achieved. Based on this problem, the patent of this invention proposes a technology for personalized customization of message templates and elements, which realizes the rapid customized generation of reports. Summary of the invention

[0004] The purpose of the present invention is to provide a dynamically editable report generation method based on WPS secondary development. Aiming at the problem that the current report generation template is cumbersome to make and the personalized customization of report elements cannot be flexibly realized, a report generation method based on WPS secondary development is provided. Through the application of this method, a basic report management and generation template in a localization framework is provided, and a WPS report is generated according to the set template and elements. Different WPS report templates can be selected, and different elements can be set according to business needs to generate reports, realizing visual online editing of report elements and intelligent generation of report templates.

[0005] To achieve the above object, the present invention provides a method for generating a dynamic editable report based on WPS secondary development, comprising the following steps:

[0006] Step 1: Create a new WPS document, add a bookmark to the WPS document, save the element, and add a bookmark placeholder where the element needs to be replaced in the WPS document;

[0007] Step 2: Read the WPS document, call the WPS development interface, load all bookmarks in the WPS document, load all elements in the WPS document, and form a template element tree according to different dimensions;

[0008] Step 3: If the loading fails, the process ends;

[0009] If the loading is successful, edit the template element tree, add or delete elements according to different dimensions based on actual combat needs, customize the template elements, and obtain a new element set;

[0010] Step 4: Save the new template element set to generate a new template file;

[0011] Step 5: If the generation fails, the process ends;

[0012] If the generation is successful, query the database or parse the message to obtain the intelligence truth value corresponding to the corresponding element, select the target type and reporting center information, call the WPS development interface, find the bookmark subscript corresponding to the template element, call the WPS development interface again, replace the bookmark placeholder in the report with the intelligence truth value, and generate the report file R1;

[0013] Step 6: Preview the report R1 generated in step 5 in the software interface, and make appropriate modifications in the interface to obtain the report file R2;

[0014] Step 7: The final report file R2 is generated through step 6 and saved in the specified path.

[0015] Beneficial effects:

[0016] The present invention provides a dynamic editable report generation method based on WPS secondary development, which aims at the problems that the report generation process in the current combat system is cumbersome, the user experience is poor, and the report cannot be quickly generated according to the personalized needs of users. Through the application of the method of the present invention, the report generation can be realized quickly, accurately and intuitively. The present invention can simplify the process of entering report templates, use the bookmark attribute unique to the WPS software, and manage the bookmark placeholder as a template element; it can achieve a high degree of decoupling between report templates and report elements, support highly personalized settings of report templates, and unified generation management of calculation data; it can sort out template elements from the business process and the needs of different combat scenarios, form a briefing and detailed report element library, and support classification, screening and adding; the structural stability, scalability, and composability are strong, and combat situation reports under various scenarios can be generated with one key, simplifying the operation process, improving configuration efficiency, achieving report scalability, portability and operability, and significantly improving the user's personalized report generation capability. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1It is the main flow chart of the method for generating a dynamically editable report based on WPS secondary development involved in an embodiment of the present invention. DETAILED DESCRIPTION

[0018] The preferred mechanism and implementation method of the present invention are further described below in conjunction with the accompanying drawings and specific implementation methods.

[0019] like Figure 1 As shown, an embodiment of the present invention discloses a technical solution for a dynamically editable report generation method based on WPS secondary development, and the steps involved in the present invention are template content input, template element loading, template element customization, template generation, report generation, report preview, and report saving.

[0020] Example 1

[0021] The method for compensating for expansion and contraction of a printed circuit board made of heterogeneous materials in this embodiment comprises the following steps:

[0022] Step 1: Create a new WPS document d, and in the document d, at positions l1, l2, …, l m Add bookmarks b1, b2, ..., b m , save the elements e1,e2,…,e m , and add a bookmark placeholder where the element needs to be replaced in the WPS document;

[0023] Step 2: Read the WPS document d, call the WPS development interface get_Bookmarks(), and load all the bookmarks b1, b2, ..., b in the WPS document m , load all elements e1, e2, …, e in WPS document d m , forming a template element tree according to different dimensions;

[0024] Step 3: If the loading fails, the process ends;

[0025] If the loading is successful, edit the template element tree, add or delete elements according to different dimensions according to actual combat needs, customize the template elements, and obtain a new element set e1, e2,…, e n ;

[0026] Step 4: Set the new template element set e1, e2, …, e n Save and generate a new template file D;

[0027] Step 5: If the generation fails, the process ends;

[0028] If the generation is successful, query the database or parse the message to obtain the intelligence truth value i1,i2,…,i corresponding to the corresponding element n, and select the target type t, reporting center c and other information, call the WPS development interface getBookmarkIndexByName(), and find the bookmark index b1, b2, ..., b corresponding to the template element n , call the WPS development interface setBookMarkText() again to replace the bookmark placeholder in the report with the intelligence truth value i1,i2,…,i n , generate report file R1;

[0029] Step 6: Preview the report R1 generated in step 5 in the software interface, and make appropriate modifications in the interface to obtain the report file R2;

[0030] Step 7: The final report file R2 is generated through step 6 and saved in the specified path.

[0031] The present invention provides a dynamic editable report generation method based on WPS secondary development, which aims at the problems that the report generation process in the current combat system is cumbersome, the user experience is poor, and the report cannot be quickly generated according to the personalized needs of users. Through the application of the method of the present invention, the report generation can be realized quickly, accurately and intuitively. The present invention can simplify the process of entering report templates, use the bookmark attribute unique to the WPS software, and manage the bookmark placeholder as a template element; it can achieve a high degree of decoupling between report templates and report elements, support highly personalized settings of report templates, and unified generation management of calculation data; it can sort out template elements from the business process and the needs of different combat scenarios, form a briefing and detailed report element library, and support classification, screening and adding; the structural stability, scalability, and composability are strong, and combat situation reports under various scenarios can be generated with one key, simplifying the operation process, improving configuration efficiency, achieving report scalability, portability and operability, and significantly improving the user's personalized report generation capability.

[0032] Finally, it should be noted that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or make equivalent substitutions for some of the technical features therein. However, any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for generating a dynamic editable report based on WPS secondary development, characterized in that: The following steps are involved: Step 1: Create a new WPS document, add a bookmark to the WPS document, save the element, and add a bookmark placeholder where the element needs to be replaced in the WPS document; Step 2: Read the WPS document, call the WPS development interface, load all bookmarks in the WPS document, load all elements in the WPS document, and form a template element tree according to different dimensions; Step 3: If the loading fails, the process ends; If the loading is successful, edit the template element tree, add or delete elements according to different dimensions based on actual combat needs, customize the template elements, and obtain a new element set; Step 4: Save the new template element set to generate a new template file; Step 5: If the generation fails, the process ends; If the generation is successful, query the database or parse the message to obtain the intelligence truth value corresponding to the corresponding element, select the target type and reporting center information, call the WPS development interface, find the bookmark subscript corresponding to the template element, call the WPS development interface again, replace the bookmark placeholder in the report with the intelligence truth value, and generate the report file R1; Step 6: Preview the report R1 generated in step 5 in the software interface, and make appropriate modifications in the interface to obtain the report file R2; Step 7: The final report file R2 is generated through step 6 and saved in the specified path.