CN105653255A - Method arranging report template to automatically generate report files in office frame - Google Patents
Method arranging report template to automatically generate report files in office frame Download PDFInfo
- Publication number
- CN105653255A CN105653255A CN201410741185.1A CN201410741185A CN105653255A CN 105653255 A CN105653255 A CN 105653255A CN 201410741185 A CN201410741185 A CN 201410741185A CN 105653255 A CN105653255 A CN 105653255A
- Authority
- CN
- China
- Prior art keywords
- office
- formula
- report
- document template
- 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.)
- Granted
Links
Landscapes
- Document Processing Apparatus (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to a method arranging a report template to automatically generate report files in an office frame. An office file template is built via a user-defined format; a user-defined button is added to the office file template; data to be output to the office file template is defined and a user-defined figure selection calculation formula is set; a link is built between the data formula and a position according to the position where the data has to be filled and selected by the user in the office file template; the office file template containing the link is stored; and the user clicks a report-generation button in the office and calls a corresponding office file template to generate the office report. Compared with regular report function, high format expansion property is achieved and the office can output various formats; compared with common office tool calculation, table data of any database can be read and calculated as needed; and work efficiency can be improved and low fault rate is realized due to the report generated via programs.
Description
Technical field
The present invention relates to the enterprise information management system (ERP) technical field, particularly relate to a kind of report template that arranges in OFFICE framework automatically to generate the method for report file.
Background technology
The business system such as assets, budget generates report and is generally used for both needing strict control report form, needs again the scene applied the peculiar computing function of ERP system and automatically read and write business datum function. But. conventional report capability, fixing reporting format can only be satisfied with, the extensibility of its form is lower; And common OFFICE instrument computing, although its form can realize diversification, but only can meet the computing action of common not band business, cannot realize reading specific data function.
For both needing strict control report form, need again the scene applied the peculiar computing function of ERP system and automatically read and write business datum function, user has to adopt by after common report capability derivation form, process according to the manual mode producing report of data, call format could be met. Seriously have impact on working efficiency, and the exactness of data inputting can not be ensured.
Summary of the invention
In view of above-mentioned analysis, report template is set in OFFICE framework it is desirable to provide a kind of automatically to generate the method for report file.
The object of the present invention is mainly achieved through the following technical solutions:
OFFICE framework arranges report template automatically to generate a method for report file, comprises the following steps:
Step one, according to user instruction, self-defined form is adopted to set up OFFICE document template;
Adding custom button in step 2, the toolbar opening the page in OFFICE document template, definition needs the data outputted in OFFICE document template, and arranges self-defined peek computing formula;
Step 3, needing, selected in OFFICE document template, the position inserting data according to user, setting up linking of data formula and described position;
Step 4, preservation comprise the OFFICE document template of described link;
Step 5, interpolation in OFFICE or other positions " generating report " button;
Step 6, user directly trigger in OFFICE or click " generating report " button in other positions, call corresponding OFFICE document template generation OFFICE and report.
Wherein, step 2 is further comprising the steps: add " arranging a figure selection formula " custom button in the toolbar opening the page of OFFICE document template; Definition needs the data outputted in OFFICE document template; When user clicks described " arranging figure selection formula " custom button, call the business formula encapsulated voluntarily, thus realize self-defined peek computing formula and arrange; User arranges after function pages carries out operation click determines at formula, arranges interface by return-formula Chinese and English expression formula.
Wherein, step 3 comprises further:
Formula Chinese expression formula is shown to OFFICE page correspondence position.
Wherein, step 4 comprises further:
OFFICE document template is saved to database by user, and described content comprises:
A) OFFCIE document template number ID
B) corresponding OFFICE content of text
C) numbering of equation ID list
D) formula English expression formula
E) association relation between each parameter of formula.
Wherein, step 5 comprises further:
Write and generate reporting interface method for external call.
Wherein, step 6 comprises further:
1) according to " generating report " the OFFICE document template number ID that button is corresponding, from database, OFFICE document template content is read;
2) obtain formula expression according to formula ID, call computing function and carry out computing, the value calculated is replaced to corresponding Chinese expression formula position;
3), after all formula operations and replacement complete, prompting user selects OFFICE document storing position.
The useful effect of the present invention is as follows:
1. relatively conventional report capability, the extensibility of form is higher, it may be achieved the form effect that any OFFICE can export.
2. relative to common OFFICE instrument computing, it is possible to require the reading and the computing that carry out arbitrary data storehouse table data according to user.
Increase work efficiency on the one hand, produce form by program on the other hand so that probability of makeing mistakes reduces.
Other features and advantages of the present invention will be set forth in the following description, and, becoming apparent from specification sheets of part, or understand by implementing the present invention. The object of the present invention and other advantages realize by structure specifically noted in the specification sheets write, claim book and accompanying drawing and obtain.
Accompanying drawing explanation
Accompanying drawing is only for illustrating the object of specific embodiment, and does not think limitation of the present invention, and in whole accompanying drawing, identical reference symbol represents identical parts.
Fig. 1 is the schema of method described in the specific embodiment of the invention.
Embodiment
Carrying out concrete expression formula the preferred embodiments of the present invention below in conjunction with accompanying drawing, wherein, accompanying drawing forms the application's part, and together with embodiments of the present invention for explaining the principle of the present invention.
First by reference to the accompanying drawings method described in the embodiment of the present invention is described in detail by Fig. 1.
Described method, comprises the following steps:
Step one, according to user instruction, self-defined form is adopted to set up OFFICE document template, such as word text template;
Adding custom button in step 2, the toolbar opening the page in word document template, definition needs the data outputted in word document template, and arranges self-defined peek computing formula;Further comprising the steps:
1. increasing a custom button newly such as " arranging figure selection formula " custom button by code to Word toolbar, code is as follows:
AddButtons (7, msoButtonCaption, InSertCQDataClick, ' arrange figure selection formula ', true);
First parameter 7 designated button numbering;
2nd parameter msoButtonCaption designated button display styles (whether comprising picture etc.);
The event of the 3rd parameter InSertCQDataClick designated button clicking trigger;
The display word of the 4th parameter ' arrange figure selection formula ' designated button;
Whether the 5th parametric t rue designated button be visible.
2. the method name specified according to above-mentioned 3rd parameter, creates method of the same name and realizes custom button click event, and code is as follows:
ProcedureTAddIn.InSertCQDataClick (constCtrl:OleVariant; VarCancelDefault:OleVariant);
3. writing code at InSertCQDataClick method body so that call the business formula encapsulated voluntarily when user clicks, thus realize self-defined peek computing formula and arrange, code is as follows:
BSetGs:=Set_CQQusu_Fmis (sTag, sComment);--what establishment encapsulated voluntarily arranges functional object
The formula English expression formula that first parameter returns setting for preserving, N1=N2*N3;
2nd formula that parameter returns setting for preserving Chinese expression formula, as: [this month electricity charge]=[electricity price] * [of that month power consumption];
Mainly realize establishment business formula in Set_CQQusu_Fmis method and functionality controls is set and popup web page arranges logic for user;
4. method body writes the parameter return of value that code process formula arranges function, and code is as follows:
InsertStrToDoc (sTag, sComment);
The formula English expression formula that first parameter returns setting for preserving, such as N1=N2*N3;
2nd formula that parameter returns setting for preserving Chinese expression formula, as: [this month electricity charge]=[electricity price] * [of that month power consumption];
Following process is carried out: user arranges after function pages carries out operation click determines at formula, arranges the formula Chinese and English expression formula that interface will return in InsertStrToDoc method.
Step 3, the position inserting data according to user in needing selected in word document template, set up linking of data formula and described position; Comprise further:
By code process return of value by formula Chinese expression formula display to word page correspondence position (such as [this month electricity charge]=[electricity price] * [of that month power consumption]).
Step 4, preservation comprise the word document template of described link; Comprise further:
Word document template is saved to database by user, and described content comprises:
A) word document template number ID
B) corresponding word content of text
C) numbering of equation ID list
D) formula English expression formula
E) association relation between each parameter of formula.
Step 5, interpolation in word or other positions " generating report " button;
Comprise further:
Write and generate reporting interface method for external call;
FunctionBuildReport (iDocID:Integer): boolean;
Parameter iDocID is used to specify word document template unique number ID (as: 099).
Step 6, user directly trigger in word or click " generating report " button in other positions, call corresponding OFFICE document template generation OFFICE and report; Comprise further:
1. method body main logic is, according to word document template number ID (as: 099) corresponding to " generating report " button, reads word document template content to database, comprises:
A) word document template unique number ID (as: 099)
B) corresponding word content of text
C) numbering of equation ID (as: 001) list,
D) formula English expression formula A=B*C
E) association relation between each parameter of formula
2. obtain formula according to formula ID:001, Background scheduling computing function carries out computing, return and show to formula correspondence position, as read formula English expression formula N1=N2*N3, then calculate the value of N2*N3, the value calculated is replaced to corresponding Chinese expression formula [this month electricity charge]=[electricity price] * [of that month power consumption] position
3. all formula operations and replacement point out user to select deposit position that .doc file is stored to specified location after completing.
In sum, embodiments providing and arrange report template in OFFICE framework automatically to generate the method for report file, useful effect is as follows:
1. relatively conventional report capability, the extensibility of form is higher, it may be achieved the form effect that any OFFICE can export.
2. relative to common OFFICE instrument computing, it is possible to require the reading and the computing that carry out arbitrary data storehouse table data according to user.
Improve working efficiency on the one hand, produce form by program on the other hand so that probability of makeing mistakes reduces.
It will be appreciated by those skilled in the art that, it is achieved all or part of flow process of above-described embodiment method, it is possible to the hardware carrying out instruction relevant by computer program completes, and described program can be stored in computer-readable recording medium. Wherein, described computer-readable recording medium is that disk, CD, read-only storage memory body or random storage remember body etc.
The above; it is only the present invention's preferably embodiment, but protection scope of the present invention is not limited thereto, any it is familiar with those skilled in the art in the technical scope that the present invention discloses; the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.
Claims (6)
1. report template is set in OFFICE framework automatically to generate a method for report file, comprises the following steps:
Step one, according to user instruction, self-defined form is adopted to set up OFFICE document template;
Adding custom button in step 2, the toolbar opening the page in OFFICE document template, definition needs the data outputted in OFFICE document template, and arranges self-defined peek computing formula;
Step 3, needing, selected in OFFICE document template, the position inserting data according to user, setting up linking of data formula and described position;
Step 4, preservation comprise the OFFICE document template of described link;
Step 5, interpolation in OFFICE or other positions " generating report " button;
Step 6, user directly trigger in OFFICE or click " generating report " button in other positions, call corresponding OFFICE document template generation OFFICE and report.
2. method according to claim 1, wherein, step 2 is further comprising the steps:
The toolbar opening the page of OFFICE document template adds " arranging a figure selection formula " custom button; Definition needs the data outputted in OFFICE document template;
When user clicks described " arranging figure selection formula " custom button, call the business formula encapsulated voluntarily, thus realize self-defined peek computing formula and arrange; User arranges after function pages carries out operation click determines at formula, arranges interface by return-formula Chinese and English expression formula.
3. method according to claim 1, wherein, step 3 comprises further:
Formula Chinese expression formula is shown to OFFICE page correspondence position.
4. method according to claim 1, wherein, step 4 comprises further:
OFFICE document template is saved to database by user, and described content comprises:
A) OFFCIE document template number ID
B) corresponding OFFICE content of text
C) numbering of equation ID list
D) formula English expression formula
E) association relation between each parameter of formula.
5. method according to claim 1, wherein, step 5 comprises further:
Write and generate reporting interface method for external call.
6. method according to claim 1, wherein, step 6 comprises further:
1) according to " generating report " the OFFICE document template number ID that button is corresponding, from database, OFFICE document template content is read;
2) obtain formula expression according to formula ID, call computing function and carry out computing, the value calculated is replaced to corresponding Chinese expression formula position;
3), after all formula operations and replacement complete, prompting user selects OFFICE document storing position.
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 true CN105653255A (en) | 2016-06-08 |
CN105653255B 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) |
Cited By (7)
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 |
CN108536658A (en) * | 2018-03-06 | 2018-09-14 | 杭州优工品科技有限公司 | For customized label data generation method and device |
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 |
CN117350266A (en) * | 2023-12-06 | 2024-01-05 | 本溪钢铁(集团)信息自动化有限责任公司 | Method and system for automatically generating document |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030034999A1 (en) * | 2001-05-31 | 2003-02-20 | Mindspeak, Llc | Enhancing interactive presentations |
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 |
-
2014
- 2014-12-08 CN CN201410741185.1A patent/CN105653255B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030034999A1 (en) * | 2001-05-31 | 2003-02-20 | Mindspeak, Llc | Enhancing interactive presentations |
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 (2)
Title |
---|
李政: "《VBA任务驱动教程》", 31 July 2014, 国防工业出版社 * |
金良锋,周文祥: "WORD试验报告的自动生成", 《中国测试技术》 * |
Cited By (9)
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 |
CN108536658A (en) * | 2018-03-06 | 2018-09-14 | 杭州优工品科技有限公司 | For customized label data 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 |
CN117350266A (en) * | 2023-12-06 | 2024-01-05 | 本溪钢铁(集团)信息自动化有限责任公司 | Method and system for automatically generating document |
CN117350266B (en) * | 2023-12-06 | 2024-03-08 | 本溪钢铁(集团)信息自动化有限责任公司 | Method and system for automatically generating document |
Also Published As
Publication number | Publication date |
---|---|
CN105653255B (en) | 2018-07-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105653255A (en) | Method arranging report template to automatically generate report files in office frame | |
KR101805946B1 (en) | Generating text manipulation programs using input-output examples | |
CN101122899B (en) | Report generation method and device | |
CN110069257A (en) | A kind of interface processing method, device and terminal | |
CN111625226B (en) | Prototype-based man-machine interaction design implementation method and system | |
CN103810152A (en) | Visualized formula editor | |
CN101944082A (en) | Excel-like report processing method | |
CN104731588B (en) | Page layout document generating method and page layout file creating apparatus | |
CN114461200A (en) | Low-code development application and method based on cloud SaaS platform | |
US20190294664A1 (en) | Dynamically transferring data from a spreadsheet to a remote application | |
CN111881662A (en) | Form generation method, device, processing equipment and storage medium | |
CN104504214A (en) | Electrical schematic diagram generation method | |
CN103559184A (en) | Form page display method and device | |
CN102110142A (en) | Method for dynamically expanding personnel transaction in human resource management information system | |
CN108959230B (en) | Method and device for generating report template | |
CN103257987A (en) | Rule-based distributed log service implementation method | |
CN113535165A (en) | Interface generation method and device, electronic equipment and computer readable storage medium | |
CN104375814A (en) | Generation method and device of an interface document | |
CN106407172A (en) | XML (Extensible Markup Language)-based report generating method | |
CN115495069A (en) | Model-driven coal industry software flow implementation method, device and equipment | |
CN111026756A (en) | Method for dynamically generating form and associated query | |
CN105095599A (en) | DWG format drawing automatic generation method | |
CN103699746A (en) | CADDS5 piping three-dimensional design method and system based on database | |
JP2009531751A (en) | Method and system for processing spreadsheet data based on time order | |
CN104156209A (en) | Cross-platform application interface modeling method and device |
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 |