CN104461538B - Report form generation method and report generating system - Google Patents
Report form generation method and report generating system Download PDFInfo
- Publication number
- CN104461538B CN104461538B CN201410745760.5A CN201410745760A CN104461538B CN 104461538 B CN104461538 B CN 104461538B CN 201410745760 A CN201410745760 A CN 201410745760A CN 104461538 B CN104461538 B CN 104461538B
- Authority
- CN
- China
- Prior art keywords
- report
- template
- formula
- report form
- form formula
- 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
Links
Landscapes
- Document Processing Apparatus (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention proposes based on Jasperreport a kind of report form generation method and a kind of report generating system, report form generation method therein include:According to the report generation instruction received, the selection target report form formula template in preset a variety of report form formula templates;The target report form formula template is packaged into class object;The class object is parsed, to obtain the figure selection formula of each cell in the target report form formula template;According to the figure selection formula of each cell, data source is packaged;Report is generated according to the data source after encapsulation.According to the technical solution of the present invention, user operation interface only need to select need template and logging data, system will automatic report generation, thus improve report exploitation convenience.
Description
Technical field
The present invention relates to report development technique fields, raw in particular to a kind of report form generation method and a kind of report
At system.
Background technique
Instantly there are many powerful open source report developing instruments, such as:Bird, Jasperreport etc., these reports are opened
Hair tool can quickly develop report.
However, the particularity of the report due to each specific area, these report developing instruments there is also certain deficiency,
For example, each cell in accounting statement is an independent data source in accounting statement field, all have specific public
Formula, and existing technology can not quickly and efficiently develop report according to each independent data source, this reaches accounting profession with regard to hardly possible
It is required that.
Therefore a kind of new technical solution is needed, report can be more efficiently developed.
Summary of the invention
The present invention is based on the above problems, proposes a kind of new technical solution, can more efficiently develop report.
In view of this, the invention proposes a kind of report form generation methods, including:It is instructed according to the report generation received,
The selection target report form formula template in preset a variety of report form formula templates;The target report form formula template is packaged into class
Object;The class object is parsed, to obtain the figure selection formula of each cell in the target report form formula template;
According to the figure selection formula of each cell, data source is packaged;It is generated according to the data source after encapsulation
Report.
In the technical scheme, a variety of report form formula templates can be preset, and are obtained by the class object of encapsulation
The figure selection formula of each cell in report form formula template, to match each cell with the figure selection formula of each cell
Data, complete the encapsulation of data source, thus according to after encapsulation data source obtain report.Pass through the technical solution, Yong Hu
Operation interface need to only select need template and logging data, system will automatic report generation, thus improve report exploitation
Convenience.
In the above-mentioned technical solutions, it is preferable that before selecting the target report form formula template, further include:According to connecing
A variety of report form formula templates are established in the foundation order received.
In the technical scheme, a variety of report form formula templates, such as balance sheet can be set according to the needs of users
Template etc..User can select most suitable or immediate template to carry out report exploitation according to their needs, without every
It starts all over again from the beginning when secondary exploitation report.
In the above-mentioned technical solutions, it is preferable that be provided with report name, line flag, folding in the report form formula template
Label, unit case marking, the figure selection formula, Course in English, prompting message and data type.
In the technical scheme, there are many options for setting in report form formula template, to meet the use demand of user,
In, these options include but is not limited to report name, line flag, fold indication, unit case marking, figure selection formula, Course in English,
Prompting message and data type, user can also according to their needs modify to report template, increase or delete option.
In the above-mentioned technical solutions, it is preferable that the class object can be explained with Java language and the basis
Data source after encapsulation generates report, specifically includes:According to the data source after encapsulation, in Jasperreport developing instrument
Middle calling iReport template, and the report is write using the Java language in the iReport template.
In the technical scheme, this common report developing instrument of Jasperreport has been used, and its spy is utilized
Some JavaBean (Reusable Module of written in Java) data source mechanism.Due to using iReport (report the visual design
Device) carry out report generation, and iReport is that report is write using Java language, therefore, in order to guarantee smoothly to develop report
Table, in this application, the class object of encapsulation allow for being explained by Java language.
In the above-mentioned technical solutions, it is preferable that further include:It is public to any report according to the change order received
The figure selection formula of any cell in formula template is modified;According to change as a result, updating according to any described
The report of report form formula template generation.
In the technical scheme, user can according to their needs be modified report form formula template.For example, when receiving
To the figure selection formula to any subject or any cell in report form formula template change order when, user only needs directly
Change is made to report form formula template, so that it may so that all being updated by the report of the report form formula template generation.Pass through
The technical solution greatly improves the convenience that user modifies during developing report with Perfect the work, so that opening
It is more convenient to send out work, improves working efficiency.
Another aspect of the present invention proposes a kind of report generating system, including:Selecting unit, according to the report received
Generate instruction, the selection target report form formula template in preset a variety of report form formula templates;First encapsulation unit, by the mesh
Mark report form formula template is packaged into class object;Resolution unit parses the class object, public to obtain the target report
The figure selection formula of each cell in formula template;Second encapsulation unit, according to the figure selection formula of each cell,
Data source is packaged;Report generation unit generates report according to the data source after encapsulation.
In the technical scheme, a variety of report form formula templates can be preset, and are obtained by the class object of encapsulation
The figure selection formula of each cell in report form formula template, to match each cell with the figure selection formula of each cell
Data, complete the encapsulation of data source, thus according to after encapsulation data source obtain report.Pass through the technical solution, Yong Hu
Operation interface need to only select need template and logging data, system will automatic report generation, thus improve report exploitation
Convenience.
In the above-mentioned technical solutions, it is preferable that further include:Template establishes unit, is selecting the target report form formula mould
Before plate, according to the foundation order received, a variety of report form formula templates are established.
In the technical scheme, a variety of report form formula templates, such as balance sheet can be set according to the needs of users
Template etc..User can select most suitable or immediate template to carry out report exploitation according to their needs, without every
It starts all over again from the beginning when secondary exploitation report.
In the above-mentioned technical solutions, it is preferable that be provided with report name, line flag, folding in the report form formula template
Label, unit case marking, the figure selection formula, Course in English, prompting message and data type.
In the technical scheme, there are many options for setting in report form formula template, to meet the use demand of user,
In, these options include but is not limited to report name, line flag, fold indication, unit case marking, figure selection formula, Course in English,
Prompting message and data type, user can also according to their needs modify to report template, increase or delete option.
In the above-mentioned technical solutions, it is preferable that the class object can be explained with Java language and the report
Generation unit is specifically used for:According to the data source after encapsulation, iReport mould is called in Jasperreport developing instrument
Plate, and the report is write using the Java language in the iReport template.
In the technical scheme, this common report developing instrument of Jasperreport has been used, and its spy is utilized
Some JavaBean (Reusable Module of written in Java) data source mechanism.Due to using iReport (report the visual design
Device) carry out report generation, and iReport is that report is write using Java language, therefore, in order to guarantee smoothly to develop report
Table, in this application, the class object of encapsulation allow for being explained by Java language.
In the above-mentioned technical solutions, it is preferable that further include:Template changing unit, according to the change order received, to appointing
The figure selection formula of any cell in the one report form formula template is modified;Report updating unit, according to
The change of the template changing unit is as a result, update the report.
In the technical scheme, user can according to their needs be modified report form formula template.For example, when receiving
To the figure selection formula to any subject or any cell in report form formula template change order when, user only needs directly
Change is made to report form formula template, so that it may so that all being updated by the report of the report form formula template generation.Pass through
The technical solution greatly improves the convenience that user modifies during developing report with Perfect the work, so that opening
It is more convenient to send out work, improves working efficiency.
By above technical scheme, user need to only select template and the logging data needed in operation interface, and system will
Automatic report generation, to improve the convenience of report exploitation.
Detailed description of the invention
Fig. 1 shows the flow chart of report form generation method according to an embodiment of the invention;
Fig. 2 shows the block diagrams of report generating system according to an embodiment of the invention;
Fig. 3 shows the screenshotss schematic diagram of report form formula template according to an embodiment of the invention.
Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real
Applying mode, the present invention is further described in detail.It should be noted that in the absence of conflict, the implementation of the application
Feature in example and embodiment can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, still, the present invention may be used also
To be implemented using other than the one described here other modes, therefore, protection scope of the present invention is not by described below
Specific embodiment limitation.
Fig. 1 shows the flow chart of report form generation method according to an embodiment of the invention.
As shown in Figure 1, report form generation method according to an embodiment of the invention, including:
Step 102, it is instructed according to the report generation received, the selection target report in preset a variety of report form formula templates
Table formula template.
Step 104, target report form formula template is packaged into class object.
Step 106, class object is parsed, it is public with the access for obtaining each cell in target report form formula template
Formula.
Step 108, according to the figure selection formula of each cell, data source is packaged.
Step 110, report is generated according to the data source after encapsulation.
In the technical scheme, a variety of report form formula templates can be preset, and are obtained by the class object of encapsulation
The figure selection formula of each cell in report form formula template, to match each cell with the figure selection formula of each cell
Data, complete the encapsulation of data source, thus according to after encapsulation data source obtain report.Pass through the technical solution, Yong Hu
Operation interface need to only select need template and logging data, system will automatic report generation, thus improve report exploitation
Convenience.
In the above-mentioned technical solutions, it is preferable that before step 102, further include:According to the foundation order received, build
Found a variety of report form formula templates.
In the technical scheme, a variety of report form formula templates, such as balance sheet can be set according to the needs of users
Template etc..User can select most suitable or immediate template to carry out report exploitation according to their needs, without every
It starts all over again from the beginning when secondary exploitation report.
In the above-mentioned technical solutions, it is preferable that be provided in report form formula template report name, line flag, fold indication,
Unit case marking, figure selection formula, Course in English, prompting message and data type.
In the technical scheme, there are many options for setting in report form formula template, to meet the use demand of user,
In, these options include but is not limited to report name, line flag, fold indication, unit case marking, figure selection formula, Course in English,
Prompting message and data type, user can also according to their needs modify to report template, increase or delete option.
In the above-mentioned technical solutions, it is preferable that class object can be explained with Java language and step 110 is specific
Including:According to the data source after encapsulation, iReport template is called in Jasperreport developing instrument, and in iReport mould
Report is write using Java language in plate.
In the technical scheme, this common report developing instrument of Jasperreport has been used, and its spy is utilized
Some JavaBean (Reusable Module of written in Java) data source mechanism.Due to using iReport (report the visual design
Device) carry out report generation, and iReport is that report is write using Java language, therefore, in order to guarantee smoothly to develop report
Table, in this application, the class object of encapsulation allow for being explained by Java language.
In the above-mentioned technical solutions, it is preferable that further include:According to the change order received, to any report form formula mould
The figure selection formula of any cell in plate is modified;According to change as a result, updating according to any report form formula template generation
Report.
In the technical scheme, user can according to their needs be modified report form formula template.For example, when receiving
To the figure selection formula to any subject or any cell in report form formula template change order when, user only needs directly
Change is made to report form formula template, so that it may so that all being updated by the report of the report form formula template generation.Pass through
The technical solution greatly improves the convenience that user modifies during developing report with Perfect the work, so that opening
It is more convenient to send out work, improves working efficiency.
Fig. 2 shows the block diagrams of report generating system according to an embodiment of the invention.
As shown in Fig. 2, report generating system 200 according to an embodiment of the invention, including:Selecting unit 202, root
According to the report generation instruction received, the selection target report form formula template in preset a variety of report form formula templates;First envelope
Unit 204 is filled, target report form formula template is packaged into class object;Resolution unit 206, parses class object, to obtain
The figure selection formula of each cell in target report form formula template;Second encapsulation unit 208, according to the access of each cell
Formula is packaged data source;Report generation unit 210 generates report according to the data source after encapsulation.
In the technical scheme, a variety of report form formula templates can be preset, and are obtained by the class object of encapsulation
The figure selection formula of each cell in report form formula template, to match each cell with the figure selection formula of each cell
Data, complete the encapsulation of data source, thus according to after encapsulation data source obtain report.Pass through the technical solution, Yong Hu
Operation interface need to only select need template and logging data, system will automatic report generation, thus improve report exploitation
Convenience.
In the above-mentioned technical solutions, it is preferable that further include:Template establishes unit 212, in selection target report form formula template
Before, according to the foundation order received, a variety of report form formula templates are established.
In the technical scheme, a variety of report form formula templates, such as balance sheet can be set according to the needs of users
Template etc..User can select most suitable or immediate template to carry out report exploitation according to their needs, without every
It starts all over again from the beginning when secondary exploitation report.
In the above-mentioned technical solutions, it is preferable that be provided in report form formula template report name, line flag, fold indication,
Unit case marking, figure selection formula, Course in English, prompting message and data type.
In the technical scheme, there are many options for setting in report form formula template, to meet the use demand of user,
In, these options include but is not limited to report name, line flag, fold indication, unit case marking, figure selection formula, Course in English,
Prompting message and data type, user can also according to their needs modify to report template, increase or delete option.
In the above-mentioned technical solutions, it is preferable that class object can be explained with Java language and report generation unit
210 are specifically used for:According to the data source after encapsulation, the calling iReport template in Jasperreport developing instrument, and
Report is write using Java language in iReport template.
In the technical scheme, this common report developing instrument of Jasperreport has been used, and its spy is utilized
Some JavaBean (Reusable Module of written in Java) data source mechanism.Due to using iReport (report the visual design
Device) carry out report generation, and iReport is that report is write using Java language, therefore, in order to guarantee smoothly to develop report
Table, in this application, the class object of encapsulation allow for being explained by Java language.
In the above-mentioned technical solutions, it is preferable that further include:Template changing unit 214, according to the change order received,
The figure selection formula of any cell in any report form formula template is modified;Report updating unit 216, more according to template
Change the change of unit as a result, updating report.
In the technical scheme, user can according to their needs be modified report form formula template.For example, when receiving
To the figure selection formula to any subject or any cell in report form formula template change order when, user only needs directly
Change is made to report form formula template, so that it may so that all being updated by the report of the report form formula template generation.Pass through
The technical solution greatly improves the convenience that user modifies during developing report with Perfect the work, so that opening
It is more convenient to send out work, improves working efficiency.
Fig. 3 shows the screenshotss schematic diagram of report form formula template according to an embodiment of the invention.
The present invention is based on jasperreport developing instrument, by with its JavaBean data source mechanism,
Stage progress relevant treatment is packaged to data source, key step includes:
Step 302, defined formula template.Fig. 3 shows the data line in report form formula template, defines report name
Title, line flag, fold indication, unit case marking, Course in English, access calculation formula, prompting message, data type.
Step 304, analytic formula template file, and it is encapsulated the class object that java linguistic interpretation can be used for one.
Step 306, class object is operated, to parse the figure selection formula of each cell.
Step 308, packaged data source, and call iReport template file, it is printed or is exported as pdf,
The report of the common formats such as html, excel.
Wherein, it is as follows to carry out the sentence that class object defines:
It only needs to define formula template by the technical solution, when developing new report and can quickly obtain report
Data source result set, without considering the debt-credit direction in formula, subject quantity, section's purpose plus and minus calculation, this month in this year quantity
Etc. various parameters classification.And the access of some section's purpose is modified if necessary, it is only necessary to modify the access in its formula template file
Formula, so as to reduce the modification risk in later period.
The technical scheme of the present invention has been explained in detail above with reference to the attached drawings, and according to the technical solution of the present invention, user is grasping
Make interface only and need to select the template needed and logging data, system will automatic report generation, to improve report exploitation
Convenience.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.
Claims (6)
1. a kind of report form generation method, which is characterized in that including:
According to the report generation instruction received, the selection target report form formula template in preset a variety of report form formula templates;
The target report form formula template is packaged into class object;
The class object is parsed, to obtain the figure selection formula of each cell in the target report form formula template;
According to the figure selection formula of each cell, data source is packaged;
Report is generated according to the data source after encapsulation;
Before selecting the target report form formula template, according to the foundation order received, a variety of report form formulas are established
Template;
It is public to the access of any cell in any report form formula template according to the change order received
Formula is modified;
According to change as a result, updating the report according to any report form formula template generation.
2. report form generation method according to claim 1, which is characterized in that be provided with report in the report form formula template
Title, line flag, fold indication, unit case marking, the figure selection formula, Course in English, prompting message and data type.
3. report form generation method according to claim 1, which is characterized in that the class object can be carried out with Java language
It explains, and
The data source according to after encapsulation generates report, specifically includes:
According to the data source after encapsulation, iReport template is called in Jasperreport developing instrument, and described
The report is write using the Java language in iReport template.
4. a kind of report generating system, which is characterized in that including:
Selecting unit instructs, the selection target report in preset a variety of report form formula templates according to the report generation received
Formula template;
The target report form formula template is packaged into class object by the first encapsulation unit;
Resolution unit parses the class object, to obtain each cell in the target report form formula template
Figure selection formula;
Second encapsulation unit is packaged data source according to the figure selection formula of each cell;
Report generation unit generates report according to the data source after encapsulation;
Template establishes unit, before selecting the target report form formula template, according to the foundation order received, establishes a variety of
The report form formula template;
Template changing unit, according to the change order received, to any unit in any report form formula template
The figure selection formula of lattice is modified;
Report updating unit, according to the change of the template changing unit as a result, updating the report.
5. report generating system according to claim 4, which is characterized in that be provided with report in the report form formula template
Title, line flag, fold indication, unit case marking, the figure selection formula, Course in English, prompting message and data type.
6. report generating system according to claim 5, which is characterized in that the class object can be carried out with Java language
It explains, and
The report generation unit is specifically used for:
According to the data source after encapsulation, iReport template is called in Jasperreport developing instrument, and described
The report is write using the Java language in iReport template.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410745760.5A CN104461538B (en) | 2014-12-08 | 2014-12-08 | Report form generation method and report generating system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410745760.5A CN104461538B (en) | 2014-12-08 | 2014-12-08 | Report form generation method and report generating system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104461538A CN104461538A (en) | 2015-03-25 |
CN104461538B true CN104461538B (en) | 2018-11-30 |
Family
ID=52907649
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410745760.5A Active CN104461538B (en) | 2014-12-08 | 2014-12-08 | Report form generation method and report generating system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104461538B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105279228A (en) * | 2015-09-14 | 2016-01-27 | 深圳市永兴元科技有限公司 | Report processing method and device based on extensible markup language |
CN105260349A (en) * | 2015-10-16 | 2016-01-20 | 江苏腾云创智信息技术有限公司 | Ireport report production method capable of dynamically changing template size |
CN106648485A (en) * | 2015-10-29 | 2017-05-10 | 阿里巴巴集团控股有限公司 | Page display method and client |
CN105426465A (en) * | 2015-11-13 | 2016-03-23 | 中国建设银行股份有限公司 | Method and device for online exporting statements |
CN106933899B (en) * | 2015-12-30 | 2020-08-18 | 远光软件股份有限公司 | Table processing method and device |
CN109164992A (en) * | 2018-08-16 | 2019-01-08 | 北京易华录信息技术股份有限公司 | A kind of system for supporting multilingual printing template and its be converted into html template |
CN109783081A (en) * | 2018-12-27 | 2019-05-21 | 百富计算机技术(深圳)有限公司 | A kind of development approach of application program, device and Integrated Development Tool |
CN110008195B (en) * | 2019-04-11 | 2020-06-02 | 重庆猪八戒知识产权服务有限公司 | Method, device and system for dynamically configuring html (hypertext markup language) to pdf (pdf) |
CN110852055A (en) * | 2019-11-07 | 2020-02-28 | 北京宝兰德软件股份有限公司 | Report generation method and device based on JasperReport |
CN111126015B (en) * | 2019-11-25 | 2023-12-26 | 金蝶软件(中国)有限公司 | Report form compiling method and equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1614589A (en) * | 2003-11-08 | 2005-05-11 | 鸿富锦精密工业(深圳)有限公司 | Report generating system and method |
CN101071416A (en) * | 2007-07-02 | 2007-11-14 | 华为技术有限公司 | Report template generating system, development tool, development method and report client end |
CN101599067A (en) * | 2009-06-02 | 2009-12-09 | 广东金宇恒科技有限公司 | A kind of method of self-customizing report forms |
CN101719131A (en) * | 2009-12-01 | 2010-06-02 | 金蝶软件(中国)有限公司 | Method, device and system for processing report data |
-
2014
- 2014-12-08 CN CN201410745760.5A patent/CN104461538B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1614589A (en) * | 2003-11-08 | 2005-05-11 | 鸿富锦精密工业(深圳)有限公司 | Report generating system and method |
CN101071416A (en) * | 2007-07-02 | 2007-11-14 | 华为技术有限公司 | Report template generating system, development tool, development method and report client end |
CN101599067A (en) * | 2009-06-02 | 2009-12-09 | 广东金宇恒科技有限公司 | A kind of method of self-customizing report forms |
CN101719131A (en) * | 2009-12-01 | 2010-06-02 | 金蝶软件(中国)有限公司 | Method, device and system for processing report data |
Also Published As
Publication number | Publication date |
---|---|
CN104461538A (en) | 2015-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104461538B (en) | Report form generation method and report generating system | |
CN104933041B (en) | A kind of file beneficial to translation is extracted and restoring method | |
US8522221B1 (en) | Techniques for automatic generation of instruction-set documentation | |
CA2479310A1 (en) | Dynamic generation of schema information for data description languages | |
US8086618B2 (en) | Configuration rule translation mapper | |
CN110232177A (en) | A kind of bidding documents generation system and method in government affairs field | |
CN104050085A (en) | Forced code standard inspection method and system | |
CN106708491A (en) | Html-format mail generation method and device | |
CN104461548B (en) | The adding method and device of code snippet | |
CN104298705A (en) | Converting method of relational data and unstructured data | |
US20090055421A1 (en) | Migration and transformation of data structures | |
US20150113487A1 (en) | Automated integrated circuit design documentation | |
CN105335161B (en) | It is a kind of from TASM time abstractions state machine to extension NTA automatic machines conversion method | |
CN106383734A (en) | Method for extracting detailed design from codes | |
US8650517B1 (en) | Automatically documenting circuit designs | |
Tyers et al. | Free/open-source resources in the Apertium platform for machine translation research and development | |
CN108536660A (en) | A kind of generation method and terminal of self-defined report | |
CN107463680A (en) | A kind of method and device for integrating document | |
CN105373385A (en) | Multi-resolution UI (User Interface) adaption scripting development method of Android application | |
Herzog et al. | 4.5. 1 Systems Modeling with SysML–an experience report | |
CN104331665B (en) | A kind of generation method for reviewing object code and target code generator can be reviewed | |
CN111882419B (en) | Method and device for quality inspection of files and server | |
CN114118098A (en) | Contract review method, equipment and storage medium based on element extraction | |
Tomar et al. | Localization of Text Editor using Java Programming | |
CN104866368B (en) | A kind of Makefile document generating methods and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |