CN105653255B - A method of report template is set in OFFICE frames to automatically generate report file - Google Patents

A method of report template is set in OFFICE frames to automatically generate report file Download PDF

Info

Publication number
CN105653255B
CN105653255B CN201410741185.1A CN201410741185A CN105653255B CN 105653255 B CN105653255 B CN 105653255B CN 201410741185 A CN201410741185 A CN 201410741185A CN 105653255 B CN105653255 B CN 105653255B
Authority
CN
China
Prior art keywords
office
formula
document templates
report
user
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
CN201410741185.1A
Other languages
Chinese (zh)
Other versions
CN105653255A (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.)
Yuanguang Software Co Ltd
Original Assignee
Yuanguang Software Co Ltd
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 Yuanguang Software Co Ltd filed Critical Yuanguang Software Co Ltd
Priority to CN201410741185.1A priority Critical patent/CN105653255B/en
Publication of CN105653255A publication Critical patent/CN105653255A/en
Application granted granted Critical
Publication of CN105653255B publication Critical patent/CN105653255B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Document Processing Apparatus (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention relates to a kind of to be arranged method of the report template to automatically generate report file in OFFICE frames, and OFFICE document templates are established by using user-defined format;Custom button is added in OFFICE document templates, definition needs the data being output in OFFICE document templates, and self-defined access operational formula is arranged;According to the position that needs insert data of the user selected in OFFICE document templates, linking for data formula and the position is established;Preserve the OFFICE document templates for including the link;User clicks " generating report " button in OFFICE, and corresponding OFFICE document templates is called to generate OFFICE reports.The scalability of relatively conventional report capability, format is higher, it may be achieved the format effect that any OFFICE can be exported;Relative to common OFFICE tool operations, the reading and operation that carry out arbitrary data library table data can be required according to user.On the one hand working efficiency is improved, report is on the other hand generated by program so that error probability reduces.

Description

It is a kind of in OFFICE frames be arranged report template to automatically generate report file Method
Technical field
The present invention relates to the enterprise information management system (ERP) technical fields, more particularly to one kind to be set in OFFICE frames The method that report template is set to automatically generate report file.
Background technology
The operation systems such as assets, budget generate report commonly used in both needing stringent control report format, and need to apply The scene of the peculiar calculation function of ERP system and automatic read-write service data function.But the report capability of routines, it can only meet It is relatively low in the scalability of fixed reporting format, format;And common OFFICE tool operations, although its format can be real Existing diversification, but be only capable of meeting the common operation action without business, it cannot achieve reading and specify data function.
For both needing stringent control report format, and need using the peculiar calculation function of ERP system and automatic read-write industry The scene of business data function, after user has to using report is exported by common report capability, according to data generation by hand The mode of report is handled, and call format could be met.Working efficiency has been seriously affected, and cannot be guaranteed data inputting Correctness.
Invention content
In view of above-mentioned analysis, the present invention is intended to provide report template is arranged to automatically generate in one kind in OFFICE frames The method of report file.
The purpose of the present invention is mainly achieved through the following technical solutions:
A method of report template is set in OFFICE frames to automatically generate report file, is included the following steps:
Step 1: according to user instruction, OFFICE document templates are established using user-defined format;
Step 2: adding custom button in the toolbar that OFFICE document templates open the page, definition needs to export To the data in OFFICE document templates, and self-defined access operational formula is set;
Step 3: the position for needing to insert data according to user selected in OFFICE document templates, establishes data Formula is linked with the position;
Step 4: preserving the OFFICE document templates for including the link;
Step 5: addition " the generating report " button in OFFICE or other positions;
Step 6: user directly triggers in OFFICE or clicks " generating report " button in other positions, phase is called The OFFICE document templates answered generate OFFICE reports.
Wherein, step 2 further comprises the steps:Add in the toolbar of the opening page of OFFICE document templates Add " setting figure selection formula " custom button;Definition needs the data being output in OFFICE document templates;In user's point When hitting " setting figure selection formula " custom button, the business formula voluntarily encapsulated is called, to realize self-defined access fortune Calculate formula setting;User formula setting function pages carry out operation click determine after, setting interface by return-formula Chinese and English Expression formula.
Wherein, step 3 further comprises:
Formula Chinese expression formula is shown to OFFICE page corresponding positions.
Wherein, step 4 further comprises:
User preserves OFFICE document templates to database, and the content of preservation includes:
A) OFFCIE document templates number ID
B) corresponding OFFICE content of text
C) numbering of equation ID lists
D) formula English expression formula
E) the incidence relation between each parameter of formula.
Wherein, step 5 further comprises:
It writes and generates reporting interface method for external call.
Wherein, step 6 further comprises:
1) according to " generate and report " the corresponding OFFICE document templates number ID of button, OFFICE texts are read from database Shelves template content;
2) obtain formula expression according to formula ID, calculation function called to carry out operation, by the value being calculated replace to Corresponding Chinese expression formula position;
3) all formula operations prompt user to select OFFICE document storings position with after the completion of replacement.
The present invention has the beneficial effect that:
1. the scalability of relatively conventional report capability, format is higher, it may be achieved the lattice that any OFFICE can be exported Formula effect
2. relative to common OFFICE tool operations, the reading for carrying out arbitrary data library table data can be required according to user It takes and operation
On the one hand working efficiency is improved, report is on the other hand generated by program so that error probability reduces.
Other features and advantages of the present invention will illustrate in the following description, also, partial become from specification It obtains it is clear that understand through the implementation of the invention.The purpose of the present invention and other advantages can be by the explanations write Specifically noted structure is realized and is obtained in book, claims and attached drawing.
Description of the drawings
Attached drawing is only used for showing the purpose of specific embodiment, and is not considered as limitation of the present invention, in entire attached drawing In, identical reference mark indicates identical component.
Fig. 1 is the flow chart of specific embodiment of the invention the method.
Specific implementation mode
Carrying out expression the preferred embodiment of the present invention below in conjunction with the accompanying drawings, wherein attached drawing constitutes the application part, And it is used to illustrate the principle of the present invention together with embodiments of the present invention.
The method of the embodiment of the present invention is described in detail in conjunction with attached drawing Fig. 1 first.
The method includes the following steps:
Step 1: according to user instruction, OFFICE document templates, such as word text moulds are established using user-defined format Plate;
Step 2: adding custom button in the toolbar that word document template opens the page, definition needs to be output to Data in word document template, and self-defined access operational formula is set;Further comprise the steps:
1. such as " figure selection formula is arranged " custom button, generation to the newly-increased custom button of Word toolbars by code Code is as follows:
AddButtons (7, msoButtonCaption, InSertCQDataClick, ' setting figure selection formula ', true);
First 7 designated button of parameter number;
Whether second parameter msoButtonCaption designated buttons display styles (include picture etc.);
The event of third parameter InSertCQDataClick designated button clicking triggers;
The display word of 4th parameter ' setting figure selection formula ' designated button;
The whether visible of 5th parameter true designated button
2. according to the method name that above-mentioned third parameter is specified, creates method of the same name and realizes that custom button clicks event, Code is as follows:
procedure TAddIn.InSertCQDataClick(const Ctrl:OleVariant;var CancelDefault:OleVariant);
3. writing code in InSertCQDataClick method bodies so that call the business voluntarily encapsulated when user clicks Formula, to realize that self-defined access operational formula setting, code are as follows:
bSetGs:=Set_CQQusu_Fmis (sTag, sComment);-- create the setting functional object voluntarily encapsulated
First parameter is used to preserve the formula English expression formula for returning to setting, N1=N2*N3;
Second parameter is used to preserve the formula Chinese expression formula for returning to setting, such as:【This month electricity charge】=【Electricity price】*【When Month electricity consumption】;
Establishment business formula setting functionality controls are mainly realized in Set_CQQusu_Fmis methods and popup web page is for user Logic is set;
4. method body writes the parameter return value of code process formula setting function, code is as follows:
InsertStrToDoc(sTag,sComment);
First parameter is used to preserve the formula English expression formula for returning to setting, such as N1=N2*N3;
Second parameter is used to preserve the formula Chinese expression formula for returning to setting, such as:【This month electricity charge】=【Electricity price】*【When Month electricity consumption】;
Following processing is carried out in InsertStrToDoc methods:User carries out operation in formula setting function pages and clicks really After fixed, interface is set by the formula Chinese and English expression formula of return.
Step 3: the position for needing to insert data according to user selected in word document template, establishes data public affairs Formula is linked with the position;Further comprise:
Formula Chinese expression formula is shown to word pages corresponding position (such as by code process return value【This month electricity charge】 =【Electricity price】*【Of that month electricity consumption】).
Step 4: preserving the word document template for including the link;Further comprise:
User preserves word document template to database, and the content of preservation includes:
A) word document template number ID
B) corresponding word content of text
C) numbering of equation ID lists
D) formula English expression formula
E) the incidence relation between each parameter of formula.
Step 5: addition " the generating report " button in word or other positions;
Further comprise:
It writes and generates reporting interface method for external call;
function BuildReport(iDocID:Integer):boolean;
Parameter iDocID is for specifying word document template unique number ID (such as:099).
Step 6: user directly triggers in word or clicks " generating report " button in other positions, call accordingly OFFICE document templates generate OFFICE report;Further comprise:
1. method body main logic is, the word document template number ID corresponding to " generate and report " button is (such as: 099) it, arrives database and reads word document template content, including:
A) word document template unique number ID is (such as:099)
B) corresponding word content of text
C) numbering of equation ID is (such as:001) list,
D) formula English expression formula A=B*C
E) the incidence relation between each parameter of formula
2. according to formula ID:001 obtains formula, and Background scheduling calculation function carries out operation, returns to displaying to formula and corresponds to Position such as reads formula English expression formula N1=N2*N3, then calculates the value of N2*N3, the value being calculated is replaced to correspondence Chinese expression formula【This month electricity charge】=【Electricity price】*【Of that month electricity consumption】Position
3. prompt user selects deposit position to store .doc files to specific bit after the completion of all formula operations and replacement It sets.
In conclusion an embodiment of the present invention provides report template is arranged in OFFICE frames to automatically generate report text The method of part, has the beneficial effect that:
1. the scalability of relatively conventional report capability, format is higher, it may be achieved the lattice that any OFFICE can be exported Formula effect
2. relative to common OFFICE tool operations, the reading for carrying out arbitrary data library table data can be required according to user It takes and operation
On the one hand it improves work efficiency, report is on the other hand generated by program so that error probability reduces.
It will be understood by those skilled in the art that realizing all or part of flow of above-described embodiment method, meter can be passed through Calculation machine program is completed to instruct relevant hardware, and the program can be stored in computer readable storage medium.Wherein, institute It is disk, CD, read-only memory or random access memory etc. to state computer readable storage medium.
The foregoing is only a preferred embodiment of the present invention, but scope of protection of the present invention is not limited thereto, Any one skilled in the art in the technical scope disclosed by the present invention, the change or replacement that can be readily occurred in, It should be covered by the protection scope of the present invention.

Claims (6)

1. a kind of report template that is arranged in OFFICE frames includes the following steps in the method for automatically generating report file:
Step 1: according to user instruction, OFFICE document templates are established using user-defined format;
Step 2: adding custom button in the toolbar that OFFICE document templates open the page, definition needs to be output to Data in OFFICE document templates, and self-defined access operational formula is set;
Step 3: the position for needing to insert data according to user selected in OFFICE document templates, establishes data formula With linking for the position;
Step 4: preserving the OFFICE document templates for including the link;
Step 5: addition " the generating report " button in OFFICE;
Step 6: directly triggering " generates and report " button to user in OFFICE, corresponding OFFICE document templates is called to generate OFFICE is reported.
2. according to the method described in claim 1, wherein, step 2 further comprises the steps:
Addition one " setting figure selection formula " custom button in the toolbar of the opening page of OFFICE document templates;Definition Need the data being output in OFFICE document templates;
Described in being clicked in user when " setting figure selection formula " custom button, the business formula voluntarily encapsulated is called, to realize Self-defined access operational formula setting;User formula setting function pages carry out operation click determine after, setting interface will return Return formula Chinese and English expression formula.
3. according to the method described in claim 1, wherein, step 3 further comprises:
Formula Chinese expression formula is shown to OFFICE page corresponding positions.
4. according to the method described in claim 1, wherein, step 4 further comprises:
User preserves OFFICE document templates to database, and the content of preservation includes:
A) OFFCIE document templates number ID
B) corresponding OFFICE content of text
C) numbering of equation ID lists
D) formula English expression formula
E) the incidence relation between each parameter of formula.
5. according to the method described in claim 1, wherein, step 5 further comprises:
It writes and generates reporting interface method for external call.
6. according to the method described in claim 1, wherein, step 6 further comprises:
1) according to " generate and report " the corresponding OFFICE document templates number ID of button, OFFICE document moulds are read from database Plate content;
2) formula expression is obtained according to formula ID, calls calculation function to carry out operation, the value being calculated is replaced to correspondence Chinese expression formula position;
3) all formula operations prompt user to select OFFICE document storings position with after the completion of replacement.
CN201410741185.1A 2014-12-08 2014-12-08 A method of report template is set in OFFICE frames to automatically generate report file Active CN105653255B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410741185.1A CN105653255B (en) 2014-12-08 2014-12-08 A method of report template is set in OFFICE frames to automatically generate report file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410741185.1A CN105653255B (en) 2014-12-08 2014-12-08 A method of report template is set in OFFICE frames to automatically generate report file

Publications (2)

Publication Number Publication Date
CN105653255A CN105653255A (en) 2016-06-08
CN105653255B true CN105653255B (en) 2018-07-27

Family

ID=56481210

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410741185.1A Active CN105653255B (en) 2014-12-08 2014-12-08 A method of report template is set in OFFICE frames to automatically generate report file

Country Status (1)

Country Link
CN (1) CN105653255B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423276A (en) * 2017-08-14 2017-12-01 山东浪潮通软信息科技有限公司 A kind of analysis report generation method and device
CN108536658B (en) * 2018-03-06 2024-01-23 杭州优工品科技有限公司 Method and device for generating custom tag data
CN109871522A (en) * 2019-01-10 2019-06-11 太仓中科信息技术研究院 Calculating report book cover generation method and computer storage medium based on Matlab
CN110489702A (en) * 2019-02-21 2019-11-22 贵州广思信息网络有限公司 A method of support dummy variable to calculate in WORD calculating
CN110502234A (en) * 2019-02-21 2019-11-26 贵州广思信息网络有限公司 The method calculated automatically is realized in a kind of WORD
CN112699647A (en) * 2020-12-31 2021-04-23 杭州立思辰安科科技有限公司 Implementation method for supporting custom report
CN117350266B (en) * 2023-12-06 2024-03-08 本溪钢铁(集团)信息自动化有限责任公司 Method and system for automatically generating document

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976235A (en) * 2010-09-21 2011-02-16 天津神舟通用数据技术有限公司 Extensible Word report automatically-generating method based on dynamic web page
CN103714492A (en) * 2014-01-02 2014-04-09 广西电网公司电力科学研究院 Automatic report generating method capable of meeting power distribution network management specific data standards
CN104903891A (en) * 2012-10-31 2015-09-09 1C有限责任公司 Automated report generation method
CN104915666A (en) * 2015-06-02 2015-09-16 舟山奇普嘉教育科技有限公司 Information card information positioning acquisition method based on paper-made image scanning

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030034999A1 (en) * 2001-05-31 2003-02-20 Mindspeak, Llc Enhancing interactive presentations

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101976235A (en) * 2010-09-21 2011-02-16 天津神舟通用数据技术有限公司 Extensible Word report automatically-generating method based on dynamic web page
CN104903891A (en) * 2012-10-31 2015-09-09 1C有限责任公司 Automated report generation method
CN103714492A (en) * 2014-01-02 2014-04-09 广西电网公司电力科学研究院 Automatic report generating method capable of meeting power distribution network management specific data standards
CN104915666A (en) * 2015-06-02 2015-09-16 舟山奇普嘉教育科技有限公司 Information card information positioning acquisition method based on paper-made image scanning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WORD试验报告的自动生成;金良锋,周文祥;《中国测试技术》;20070731;第33卷(第4期);第112-115页 *

Also Published As

Publication number Publication date
CN105653255A (en) 2016-06-08

Similar Documents

Publication Publication Date Title
CN105653255B (en) A method of report template is set in OFFICE frames to automatically generate report file
CN110546662B (en) Collaborative review workflow diagrams
WO2021063045A1 (en) Blockchain-based transaction query method, apparatus and device, and blockchain-based transaction data processing method, apparatus and device
CN105912473B (en) Mobile APP automatically testing platform and test method based on BDD
CN102436498B (en) Report form generating method and relative device
US20160055079A1 (en) Software application lifecycle management
CN107193750A (en) A kind of script method for recording and device
KR20090122953A (en) Techniques to share information between application programs
CN102810057A (en) Log recording method
US20180349340A1 (en) Method for building a spreadsheet template with dynamic data transfer capabilities to a remote application
CN103810152A (en) Visualized formula editor
CN104731588B (en) Page layout document generating method and page layout file creating apparatus
CN104111994A (en) Label data screening method and device based on mixed data source
US20190294664A1 (en) Dynamically transferring data from a spreadsheet to a remote application
CN107423291A (en) A kind of data translating method and client device
CN105718434A (en) Natural language formula editing method and system
CN104156209B (en) Cross-platform interface modeling method and device
CN116090408A (en) Text content self-adaptive implementation method capable of loading large data table component cell
US11640414B2 (en) Generating workflow, report, interface, conversion, enhancement, and forms (WRICEF) objects for enterprise software
CN112181396A (en) RN code automatic generation system, method, equipment and medium
CN115952174B (en) Data table connection method, system, terminal and storage medium
CN110532391A (en) A kind of method and device of text part-of-speech tagging
CN109840213A (en) A kind of test data creation method, apparatus, terminal and the storage medium of GUI test
CN103514346A (en) Method for generating test report in computer system and computer system
US11829953B1 (en) Digital processing systems and methods for managing sprints using linked electronic boards

Legal Events

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