CN104572813B - A kind of report generation method and device - Google Patents

A kind of report generation method and device Download PDF

Info

Publication number
CN104572813B
CN104572813B CN201410691200.6A CN201410691200A CN104572813B CN 104572813 B CN104572813 B CN 104572813B CN 201410691200 A CN201410691200 A CN 201410691200A CN 104572813 B CN104572813 B CN 104572813B
Authority
CN
China
Prior art keywords
data
label
displayed
report
attribute
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
CN201410691200.6A
Other languages
Chinese (zh)
Other versions
CN104572813A (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.)
State Grid Corp of China SGCC
Beijing Guodiantong Network Technology Co Ltd
Beijing China Power Information Technology Co Ltd
Original Assignee
State Grid Corp of China SGCC
Beijing China Power Information Technology 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 State Grid Corp of China SGCC, Beijing China Power Information Technology Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201410691200.6A priority Critical patent/CN104572813B/en
Publication of CN104572813A publication Critical patent/CN104572813A/en
Application granted granted Critical
Publication of CN104572813B publication Critical patent/CN104572813B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3325Reformulation based on results of preceding query
    • G06F16/3326Reformulation based on results of preceding query using relevance feedback from the user, e.g. relevance feedback on documents, documents sets, document terms or passages
    • G06F16/3328Reformulation based on results of preceding query using relevance feedback from the user, e.g. relevance feedback on documents, documents sets, document terms or passages using graphical result space presentation or visualisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

This application provides a kind of report generation method and device, receive the instruction that user selectes the first label, obtain the attribute data of the first label, and according to the attribute data, data to be presented are looked up from the preset database, after packaging the data to be displayed, it is displayed in the form of a report, it can be seen that, the attribute data that user passes through label, data to be presented can be found from database, to which data to be presented are displayed in the form of a report, without carrying out writing for code again, therefore, the generating process of report is simplified, consequently facilitating realizing.

Description

A kind of report generation method and device
Technical field
This application involves electronic information field more particularly to a kind of report generation method and device.
Background technique
In daily work, it usually needs display data in the form of statements, for example, superior unit will supervise or examine Subordinate unit then requires subordinate unit periodically to report report, shows some data relevant to the work of subordinate unit in report, In order to for statistical analysis to the data in report to superior unit.
And existing report form generation method, designer are excessively complicated, during the generation of the report, need developer's root According to different demands, code is write, it is seen then that existing report form generation method is excessively cumbersome.
Apply for content
The embodiment of the present application provides a kind of report generation method and device, it is therefore intended that solves existing report generation side The excessively cumbersome problem of method.
To achieve the goals above, the embodiment of the present application provides following technical scheme:
A kind of report form generation method, comprising:
Receive the instruction that user selectes the first label;
The attribute data of first label is obtained, the ginseng of instruction data to be displayed is included at least in the attribute data Number;
According to the attribute data, the data to be displayed is looked up from the preset database;
The data to be displayed is packaged;
Data to be displayed after encapsulation is displayed in the form of a report.
Optionally, the attribute data for obtaining first label includes:
Receive setting of the user to the attribute of first label;
Using the attribute after setting as the attribute data of first label.
Optionally, in the attribute data further include:
Report display controlled attribute data.
Optionally, the data to be displayed by after encapsulation, which is displayed in the form of a report, includes:
Data to be displayed after encapsulation is shown in the report in the first display format, first display format is The display format of the report display controlled attribute data instruction.
Optionally, described be packaged the data to be displayed includes:
The data to be displayed is packaged into html format.
A kind of report generation device, comprising:
Receiving module selectes the instruction of the first label for receiving user;
Obtain module, included at least for obtaining the attribute data of first label, in the attribute data instruction to The parameter of display data;
Searching module, for according to the attribute data, the data to be displayed being looked up from the preset database;
Package module, for the data to be displayed to be packaged;
Display module, for the data to be displayed after encapsulation to be displayed in the form of a report.
Optionally, the attribute data for obtaining module and being used to obtain first label, specifically includes:
The receiving module is specifically used for, and receives setting of the user to the attribute of first label, and will setting Attribute data of the attribute afterwards as first label.
Optionally, the attribute data for obtaining module and being used to obtain first label, specifically includes:
The receiving module is specifically used for, and obtains the attribute data of first label, further includes in the attribute data Report display controlled attribute data.
Optionally, the display module is used to for the data to be displayed after encapsulation being displayed in the form of a report, specifically Include:
The display module is specifically used for, and the data to be displayed after encapsulation is opened up in the report in the first display format Show, first display format is the display format of report display controlled attribute data instruction.
Optionally, the package module is used to for the data to be displayed being packaged, and specifically includes:
The package module is specifically used for, and the data to be displayed is packaged into html format.
Report generation method and device described herein receive the instruction that user selectes the first label, obtain the first mark The attribute data of label, and according to the attribute data, data to be presented are looked up from the preset database, by number to be presented It after being packaged, is displayed in the form of a report, it is seen then that user, can be from database by the attribute data of label Data to be presented are found, to data to be presented are displayed in the form of a report, without carrying out code again It writes, therefore, the generating process of report is simplified, consequently facilitating realizing.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow chart of report form generation method disclosed in the embodiment of the present application;
Fig. 2 is the flow chart of another report form generation method disclosed in the embodiment of the present application;
Fig. 3 is a kind of structural schematic diagram of report generation device disclosed in the embodiment of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall in the protection scope of this application.
A kind of report form generation method disclosed in the embodiment of the present application, as shown in Figure 1, comprising the following steps:
S101: the instruction that user selectes the first label is received;
In the present embodiment, label refers to the included tags or custom tags of scripting language.The following are several frequently seen The name and function of label:
StatTag: combination page is shown for showing;
StatView: entity class is shown for controlling;
StatTab: for controlling Sheet list;
StatCol: for controlling list content;
StatDataReader: entity data set for reading in and out.
S102: the attribute data of first label is obtained, instruction data to be displayed is included at least in the attribute data Parameter;
Wherein, the parameter for indicating data to be displayed can be Exemplar Data Set view (java entity sets), filtered fields Lost ([{ }]) etc..
S103: according to the attribute data, the data to be displayed is looked up from the preset database;
S104: the data to be displayed is packaged;
S105: the data to be displayed after encapsulation is displayed in the form of a report.
For example, taking the report of generating electricity consumption data as an example, user selects corresponding mistake in the electricity consumption data Information Statistics page Filter condition (such as: year, month, electricity consumption area, electricity consumption), pops up report type selection box (first after clicking the statistics button Label selection), it selects report form type for normal list report, clicks confirming button, that is, selected label common list type.It answers The filter condition and report type information for being selected user on the statistics page with program are passed to system background, and system background, which receives, to be used The report form type of family selection, so far, system background receive the instruction (corresponding S101) that user selectes the first label.System background In filter condition deposit searchInfo (query condition information) object that first label is passed over;Report type information is deposited Enter in viewType (report form type) object, this example report form type delivered by the first tag is that normal list report is (corresponding s102);
In the database, according to the querying condition in searchInfo object write database sql query statement (example: if Counting the incoming condition of the page is year: 2014, month: August, electricity consumption area: Beijing, electricity consumption: 2000KW.What is then generated looks into Inquiry sentence is select t*from elec_info where year='2014and month='8'and elec_ The Beijing region=' ' and use_elec > ' this sentence of 2000kw'. inquire the Beijing area of in August, 2014 electricity consumption be greater than The user information of 2000kw), database executes this sql sentence, inquires qualified electricity consumption data information, and this data is believed Breath feeds back to system background (corresponding s103).
System background receives the electricity consumption data information that Database Feedback is returned, this data is encapsulated into view (report exhibition Show object) in object (corresponding s104), the backstage that report data is completed to this generates work.
View object and viewType object are fed back to browser foreground report form statistics information displayed page by final system Jsp page code in.In the code of the jsp page at the front desk of the browser by the judgement to viewType value after, call it is general Label<jjjc:statView view=">used in logical list report, the value of background database object is assigned to View='<%=view%>'.Power information report (corresponding s105) can be displayed on the browser page.
Method described in the present embodiment, user after selecting the first tag, by obtain the first label attribute data, i.e., The purpose that data to be displayed is found in the database and is shown data to be displayed with report form can be achieved, that is, It says, the generation of report can be realized by the attribute data of label, without writing the red tapes such as code, to simplify The generating process of label, is convenient for the user to use.
Another report form generation method disclosed in the embodiment of the present application, as shown in Fig. 2, including the steps that in detail below:
S201: front-end client receives the instruction that user selectes the first label;
S202: front-end client receives setting of the user to the attribute of first label, such as user is to first The setting of the filtered fields of label.
S203: front-end client is using the attribute after setting as the attribute data of first label;
In the present embodiment, attribute data includes Exemplar Data Set view (java entity sets), filtered fields lost ([{ }]), report display controlled attribute data, wherein report display controlled attribute data can be the pattern such as word of report Body, font size etc..
S204: the attribute data of the first label is sent background data base by front-end client;
S205: background data base view (java entity sets), filtered fields lost according to the example data set ([{ }]), the data to be displayed is looked up from the preset database;
S206: the data to be displayed is packaged into html format by background data base;
S207: the data to be displayed after encapsulation is shown by background data base in the report in the first display format, institute State the display format that the first display format is report display controlled attribute data instruction.
In the present embodiment,<report:stat/>can be called to instruct, the data of the html format after encapsulation are returned to Front-end client.
Report form generation method described in the present embodiment only need to introduce label, be arranged by the attribute in label, be can be realized Report filtering shows function, also, method described in the present embodiment can by attribute configuration according to different business datums Production shows the report of different types of data, has versatility.
With above method embodiment correspondingly, the embodiment of the present application also discloses a kind of report generation device, such as Fig. 3 institute Show, comprising:
Receiving module 301 selectes the instruction of the first label for receiving user;
Module 302 is obtained, for obtaining the attribute data of first label, includes at least instruction in the attribute data The parameter of data to be displayed;
Searching module 303, for according to the attribute data, the data to be displayed being looked up from the preset database;
Package module 304, for the data to be displayed to be packaged;
Display module 305, for the data to be displayed after encapsulation to be displayed in the form of a report.
In the present embodiment, optionally, the specific implementation side for obtaining module and obtaining the attribute data of first label Formula can be with are as follows: receives setting of the user to the attribute of first label, and using the attribute after setting as described first The attribute data of label.
Optionally, the specific implementation for obtaining the attribute data that module obtains first label can be with are as follows: obtains The attribute data of first label is taken, further includes report display controlled attribute data in the attribute data.
Optionally, the specific implementation that the data to be displayed after encapsulation is displayed in the form of a report by the display module Mode can be with are as follows: is shown the data to be displayed after encapsulation in the report in the first display format, the first display lattice Formula is the display format of report display controlled attribute data instruction.
Optionally, the specific implementation that the data to be displayed is packaged by the package module can be with are as follows: by institute It states data to be displayed and is packaged into html format.
In the present embodiment, interaction realizes that the process of report generation may refer to side shown in fig. 1 or fig. 2 between each module Method, which is not described herein again.
Report generation device described herein receives the instruction that user selectes the first label, obtains the category of the first label Property data data to be presented are looked up from the preset database and according to the attribute data, data to be presented are carried out It after encapsulation, is displayed in the form of a report, it is seen then that user can be found by the attribute data of label from database Data to be presented, so that data to be presented are displayed in the form of a report, without carrying out writing for code again, because This, the generating process of report is simplified, consequently facilitating realizing.
If function described in the embodiment of the present application method is realized in the form of SFU software functional unit and as independent production Product when selling or using, can store in a storage medium readable by a compute device.Based on this understanding, the application is real The part for applying a part that contributes to existing technology or the technical solution can be embodied in the form of software products, The software product is stored in a storage medium, including some instructions are used so that a calculating equipment (can be personal meter Calculation machine, server, mobile computing device or network equipment etc.) execute each embodiment the method for the application whole or portion Step by step.And storage medium above-mentioned include: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), with Machine accesses various Jie that can store program code such as memory (RAM, Random Access Memory), magnetic or disk Matter.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with it is other The difference of embodiment, same or similar part may refer to each other between each embodiment.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the application.Therefore, the application It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (8)

1. a kind of report form generation method characterized by comprising
The instruction that user selectes the first label is received, first label includes: for showing the StatTag for showing combination page Label shows the StatView label of entity class, the StatTab label for controlling Sheet list, for controlling for controlling The StatDataReader label of the label of list content StatCol and entity data set for reading in and out;
The attribute data for obtaining first label, including: receive the user setting to the attribute of first label It is fixed, using the attribute after setting as the attribute data of first label;It is to be presented that instruction is included at least in the attribute data The parameter of data, wherein the parameter of the instruction data to be displayed includes Exemplar Data Set and filtered fields;
According to the attribute data, the data to be displayed is looked up from the preset database;
The data to be displayed is packaged;
Data to be displayed after encapsulation is displayed in the form of a report.
2. the method according to claim 1, wherein in the attribute data further include:
Report display controlled attribute data.
3. according to the method described in claim 2, it is characterized in that, the data to be displayed by after encapsulation in the form of statements It is shown and includes:
Data to be displayed after encapsulation is shown in the report in the first display format, first display format is described The display format of report display controlled attribute data instruction.
4. according to the method described in claim 3, it is characterized in that, described be packaged the data to be displayed includes:
The data to be displayed is packaged into html format.
5. a kind of report generation device characterized by comprising
Receiving module, the instruction of the first label is selected for receiving user, and first label includes: to show combination for showing The StatTag label of the page, StatView label, the StatTab for controlling Sheet list for controlling displaying entity class Label, the label for controlling list content StatCol and entity data set for reading in and out StatDataReader label;
Module is obtained, it is to be presented to include at least instruction for obtaining the attribute data of first label, in the attribute data The parameter of data, wherein the parameter of the instruction data to be displayed includes Exemplar Data Set and filtered fields;
Searching module, for according to the attribute data, the data to be displayed being looked up from the preset database;
Package module, for the data to be displayed to be packaged;
Display module, for the data to be displayed after encapsulation to be displayed in the form of a report;
The attribute data for obtaining module and being used to obtain first label, specifically includes:
The receiving module is specifically used for, and receives setting of the user to the attribute of first label, and will be after setting Attribute data of the attribute as first label.
6. device according to claim 5, which is characterized in that the category for obtaining module and being used to obtain first label Property data, specifically include:
The receiving module is specifically used for, and obtains the attribute data of first label, further includes report in the attribute data Display control attribute data.
7. device according to claim 6, which is characterized in that the display module is for the data to be displayed after encapsulating It is displayed in the form of a report, specifically includes:
The display module is specifically used for, and the data to be displayed after encapsulation is shown in the report in the first display format, First display format is the display format of report display controlled attribute data instruction.
8. device according to claim 7, which is characterized in that the package module is for carrying out the data to be displayed Encapsulation, specifically includes:
The package module is specifically used for, and the data to be displayed is packaged into html format.
CN201410691200.6A 2014-11-26 2014-11-26 A kind of report generation method and device Active CN104572813B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410691200.6A CN104572813B (en) 2014-11-26 2014-11-26 A kind of report generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410691200.6A CN104572813B (en) 2014-11-26 2014-11-26 A kind of report generation method and device

Publications (2)

Publication Number Publication Date
CN104572813A CN104572813A (en) 2015-04-29
CN104572813B true CN104572813B (en) 2019-02-26

Family

ID=53088875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410691200.6A Active CN104572813B (en) 2014-11-26 2014-11-26 A kind of report generation method and device

Country Status (1)

Country Link
CN (1) CN104572813B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354237B (en) * 2015-10-09 2020-06-26 上海瀚之友信息技术服务有限公司 Business data display method
CN106934021B (en) * 2017-03-10 2020-06-23 深圳市科脉技术股份有限公司 Processing method and system for modular encapsulation report
CN107133733A (en) * 2017-04-26 2017-09-05 消检通(深圳)科技有限公司 Fire-fighting equipment maintenance report form generation method, device and computer-readable recording medium
CN109344374B (en) * 2018-08-22 2023-09-01 中国平安人寿保险股份有限公司 Report generation method and device based on big data, electronic equipment and storage medium
CN109684617A (en) * 2018-12-20 2019-04-26 北京树根互联科技有限公司 A kind of report generation method and device
CN112905586A (en) * 2019-12-03 2021-06-04 阿里巴巴集团控股有限公司 Data processing and accessing method, device, computer system and readable storage medium
CN111913776B (en) * 2020-08-10 2022-11-01 青岛海信电子技术服务有限公司 Content display method, device and equipment
CN115408445A (en) * 2022-09-01 2022-11-29 中国长江电力股份有限公司 Method for calculating and visually processing daily electric quantity data of cascade power station in real time
CN115185983A (en) * 2022-09-14 2022-10-14 北京博点智合科技有限公司 Report generation method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7703003B2 (en) * 2001-10-01 2010-04-20 Oracle America, Inc. XML document frameworks
CN101697122A (en) * 2009-10-16 2010-04-21 深圳市科陆电子科技股份有限公司 Method for generating report query conditions through predefined components
CN102298574A (en) * 2010-06-24 2011-12-28 腾讯科技(北京)有限公司 Method and device for generating self-defined report
CN102810094A (en) * 2011-05-31 2012-12-05 中兴通讯股份有限公司 Report generation method and device
CN103064689A (en) * 2013-01-04 2013-04-24 大唐软件技术股份有限公司 Implementation method and system for dynamically generating report pages

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729713A (en) * 2013-11-06 2014-04-16 远光软件股份有限公司 Audit result display configuration method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7703003B2 (en) * 2001-10-01 2010-04-20 Oracle America, Inc. XML document frameworks
CN101697122A (en) * 2009-10-16 2010-04-21 深圳市科陆电子科技股份有限公司 Method for generating report query conditions through predefined components
CN102298574A (en) * 2010-06-24 2011-12-28 腾讯科技(北京)有限公司 Method and device for generating self-defined report
CN102810094A (en) * 2011-05-31 2012-12-05 中兴通讯股份有限公司 Report generation method and device
CN103064689A (en) * 2013-01-04 2013-04-24 大唐软件技术股份有限公司 Implementation method and system for dynamically generating report pages

Also Published As

Publication number Publication date
CN104572813A (en) 2015-04-29

Similar Documents

Publication Publication Date Title
CN104572813B (en) A kind of report generation method and device
CN108363602B (en) Intelligent UI (user interface) layout method and device, terminal equipment and storage medium
US9519692B2 (en) Visualizing related events within a timeline
CN110096689A (en) Template type legal documents information fill method and device
CN109118296A (en) Movable method for pushing, device and electronic equipment
WO2019095424A1 (en) Data acquisition method and device, storage medium and terminal
CN106933722A (en) A kind of web application monitoring method, server and system
CN103729337B (en) report conversion method and device
CN108170655A (en) Production method, device, terminal device and the storage medium of Visual Report Forms
US20170154026A1 (en) Interaction relationship building and explorer for dashboard
CN104063361B (en) Report design method and Report Form Design system
CN106846176B (en) Electricity charge accounting system
CN109697064A (en) A kind of generation method and device of the customized page
CN110442341A (en) Interface configuration method, device and the terminal device of application program
CN103914501B (en) The real-time report method of power industry based on magnanimity real-time data base
CN110347383A (en) The front end development approach and device of cross-platform desktop application
CN108009145A (en) Report form generation method and device
CN108304591A (en) A kind of method for customizing of label, system and terminal device
CN109086090A (en) A kind of method, apparatus, equipment and the storage medium of server B MC configuration
CN114444478A (en) Voucher visualization method and device, electronic equipment and storage medium
TW201525917A (en) Method and device for marking in interrelated applications with operable icons
CN110266555A (en) Method for analyzing web site service request
CN104346378B (en) A kind of method, apparatus and system for realizing complex data processing
CN102222109A (en) Data processing device and method
CN112559576A (en) Data display method, system, device, storage medium and electronic equipment

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
CP03 Change of name, title or address

Address after: 100033 West Chang'an Avenue, Beijing, No. 86, No.

Co-patentee after: BEIJING CHINA POWER INFORMATION TECHNOLOGY Co.,Ltd.

Patentee after: STATE GRID CORPORATION OF CHINA

Address before: 100192 No. 86 West Chang'an Street, Xicheng District, Beijing

Co-patentee before: BEIJING CHINA POWER INFORMATION TECHNOLOGY Co.,Ltd.

Patentee before: State Grid Corporation of China

CP03 Change of name, title or address
TR01 Transfer of patent right

Effective date of registration: 20190723

Address after: 100085 Building 32-3-4108-4109, Pioneer Road, Haidian District, Beijing

Co-patentee after: STATE GRID CORPORATION OF CHINA

Patentee after: BEIJING GUODIANTONG NETWORK TECHNOLOGY Co.,Ltd.

Address before: 100033 West Chang'an Avenue, Beijing, No. 86, No.

Co-patentee before: BEIJING CHINA POWER INFORMATION TECHNOLOGY Co.,Ltd.

Patentee before: State Grid Corporation of China

TR01 Transfer of patent right