CN101751436A - Method and system for generating reports - Google Patents

Method and system for generating reports Download PDF

Info

Publication number
CN101751436A
CN101751436A CN200810240332A CN200810240332A CN101751436A CN 101751436 A CN101751436 A CN 101751436A CN 200810240332 A CN200810240332 A CN 200810240332A CN 200810240332 A CN200810240332 A CN 200810240332A CN 101751436 A CN101751436 A CN 101751436A
Authority
CN
China
Prior art keywords
data
zone
querying condition
database
main
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.)
Pending
Application number
CN200810240332A
Other languages
Chinese (zh)
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.)
China Mobile Group Shandong Co Ltd
Original Assignee
China Mobile Group Shandong 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 China Mobile Group Shandong Co Ltd filed Critical China Mobile Group Shandong Co Ltd
Priority to CN200810240332A priority Critical patent/CN101751436A/en
Publication of CN101751436A publication Critical patent/CN101751436A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a system for generating reports. The invention solves the following problems that: in the prior art, when the data of a plurality of reports are queried, operation is complex, and data query errors can occur. The method of the embodiment is as follows: for a selected main report, the corresponding relation between a region in the main report and preset query conditions is set, and the query conditions are used to locate the data in the associated report in a database; a query command specifying the region of the main report, which is sent by a user, is received, and according to the corresponding relation, the query conditions corresponding to the region of the main report specified by the query command are obtained; according to the obtained query conditions, the data in the associated report are located in the database, and according to the data, an associated report is generated. The embodiment provides the corresponding system. According to the technical scheme, the report data query operation can be simplified, and data query errors can be avoided.

Description

A kind of method of generating report forms and device
Technical field
The present invention relates to professional skill support technical field, relate to especially a kind of method and device of generating report forms.
Background technology
At present, the method and system of multiple generation form are arranged, for example in the Chinese patent application file that one piece of application number is CN01139172.3, disclose following method: from data source, seize report data; Data are suitable for the structural description of form; Select the statement form data item as required; Utilize inter-process communication techniques to call the form of general use treatment progress, with the report data seized, according to the list data item contents production report file of selecting.
And for example disclosed universal report forms production apparatus comprises in the Chinese patent application file that one piece of application number is CN200710173359.9: database, the data of storage data source; The data source definitions file generating module, the definition of data source position; The report file generation module generates report file; Report server, storage data source definitions file and report file; Land module, for the User login report server; Authentication module, identifying user identity; Parameter is transmitted module, according to the login user identity, corresponding parameters in the data source definitions file is passed to report file; The fetch interface module forms the versatility input control according to parameter, receives the user and selects; Data source pushes module, selects the data source data of storing in the database is pushed in the report file according to this user, to generate the report file that finally offers login user.
Technical scheme according to above-mentioned patent disclosure, and other technologies scheme of the prior art, during data query in carrying out a plurality of forms, in order from database, to determine the data in the form, need to set querying condition before each inquiry, operate comparatively loaded down with trivial detailsly, and may cause the homogeneous data Query Result of different forms inconsistent because querying condition sets improper, thereby produce the data query mistake.
Summary of the invention
Fundamental purpose of the present invention provides a kind of method and device that generates form, complicated operation and the problem that produces the data query mistake when solving in the prior art data query to a plurality of forms.
For addressing the above problem, the invention provides following technical scheme:
A kind of method that generates form comprises:
For the main form of choosing, zone in the main form and the corresponding relation between the default querying condition are set, described querying condition is used for determining data in the related form from database;
The querying command in main form zone that received appointment that the user sends obtains the querying condition corresponding to main form zone of this querying command appointment according to described corresponding relation;
Determine that according to the querying condition that obtains the data in the related form generate related form according to these data then from database.
A kind of device that generates form comprises:
Corresponding relation between first memory module, the zone of the main form that be used for to preserve arranges and default querying condition, described querying condition are used for the data in the definite related form of database;
Determination module be used for to receive the querying command in the main form of the appointment zone that the user sends, and draws the querying condition corresponding to main form zone of this querying command appointment according to described corresponding relation;
Generation module is used for determining that from database the data in the related form generate related form according to these data then according to the related report query conditions of determining.
According to technical scheme of the present invention, between the zone of main form and related report query conditions, set up corresponding relation, realize the generation of data acquisition and the related form of related form by in main form, selecting the zone, can select to realize by in main form, carrying out the zone to the inquiry of related form like this, only need present the data query that main form can carry out related form, therefore need not when the related form of each inquiry, to set querying condition, operate comparatively easy; And because the querying condition of related form is for setting in advance, it is errorless that this querying condition can be tested affirmation in advance, thus can guarantee when carrying out the data query of related form, to provide correct querying condition, and then guaranteed the correctness of data query.
Description of drawings
Fig. 1 is the method flow diagram in the embodiment of the invention;
Fig. 2 is a main form and related form synoptic diagram in the embodiment of the invention;
Fig. 3 is the report generation apparatus structure synoptic diagram in the embodiment of the invention.
Embodiment
In order to simplify the operation of the data query of a plurality of forms and to avoid the data query mistake, in embodiments of the present invention, generate related form according to the corresponding relation of main form and setting, specifically as shown in Figure 1, comprise following steps:
Step 11: main report query conditions is set.
Step 12: from database, obtain main report data according to main report query conditions.
In above-mentioned two steps, the data that satisfy the querying condition that arranges are taken out from database, querying condition can be the description to the data classification, namely belongs to described data category and has then satisfied querying condition, and this data category is set in advance according to the content of form.In Fig. 2, A table 21 is main form, and for example the description to the data classification is: " measurement period: in January, 2008, zone: Dongcheng District, index name: number of users; Desired value ", the data that then satisfy this data category are: " 1,275 family ", so from database, obtain these data.
Step 13: generate main form according to the main report data that obtains.
In step 11, multinomial querying condition can be set, and correspondingly obtain a plurality of data in the step 12, so the main form that generates in step 13 has also comprised multinomial clauses and subclauses, tableau format output report that can be according to the rules, for example " measurement period ", " zone ", " number of users " and " desired value " are set to gauge outfit, corresponding description and the data form that obtains are as content, by the main form A table 21 as shown in Figure 2 of this structure output.The interface of main form can utilize disclosed code or control to realize, as utilizing java EXCEL API etc. that the table format that is similar to EXCEL design interface is provided, and the table format that designs is saved in the report definition storehouse with forms such as XML files, realize the statement form definition and the memory function of What You See Is What You Get.
Obtained main form through after above-mentioned three steps, next main form has been carried out the setting of following step, made it possible to obtain related form according to main form.In application, also can choose existing form, it is carried out the setting of following step then as main form.
Step 14: the querying condition that related form is set.Similar with the querying condition of main form, the querying condition of related form is for the data of determining from database in the related form.The data of main form also can come from this database, and namely this Database contains the data source of main form.The querying condition of related form can be the classification of related report data, and this classification preestablishes.For example B table 24 is related form, the classification of data can be described as: " measurement period: in January, 2008, zone: Dongcheng District, account of finance: all subjects, new client: all new clients ", and then satisfy such other data and be: " 201,312...... ".
Step 15: the corresponding relation between zone and the related report query conditions in the main form is set.In this step, the zone in the main form can be one or more cells of main form.It is corresponding with the querying condition of related form B table 24 that cell 22 for example can be set, and it is corresponding with the querying condition of related form B table 24 that a plurality of cells 23 also can be set.With the corresponding relation between the querying condition that cell 22 and related form B table 24 are set is example, and this corresponding relation can be described as: " cell 22--measurement period: in January, 2008; Zone: Dongcheng District; Account of finance: all subjects; New client; Frequent customer ".
Step 16: determine related report query conditions.Specifically be according to the zone selected in main form, the corresponding relation that is provided with in 15 is determined related report query conditions set by step.This step is selected the zone in main form, can be to select by the operation of terminal device, for example with the zone that is provided with in the click master form.For this reason, but should preset favored area in main form, this zone further is provided with described corresponding relation in step 15, for example cell 22 is set to optionally, and is provided with described corresponding relation for this cell in step 15.Then in step 16, choose when this cell of click is, this moment is according to corresponding relation " the cell 22--measurement period: 2008 year January of cell 22 with related form B table 24; Zone: Dongcheng District; Account of finance: all subjects; New client; The frequent customer " determine to be specially querying condition: " measurement period: in January, 2008; Zone: Dongcheng District; Account of finance: all subjects; New client; The frequent customer ", promptly requiring the query statistic cycle is that in January, 2008, zone are the new client of all section's purposes and frequent customer's quantity for Dongcheng District, account of finance.
Step 17: from database, obtain related report data according to the related report query conditions of determining.With querying condition " measurement period: in January, 2008; Zone: Dongcheng District; Account of finance: all subjects; New client; The frequent customer " be example, then obtaining measurement period from database is that in January, 2008, zone are the new client of all section's purposes and frequent customer's quantity for Dongcheng District, account of finance, its numerical value is respectively as shown in each cell in the square frame among Fig. 2 25.Related form and main form can generate based on same database, so the database in this step can be the database that has comprised main report data source, obtain in this step related report data from this database.
Step 18: generate related form according to the data of obtaining in the step 17.In this step, generate the form that related form can arrange earlier related form before, comprise the color of various gauge outfit information and form etc., then data are inserted the cell of relevant position.Can also make further statistics and add form data according to default statistical rules in this step, for example the numerical value in each cell in right-hand member one row 26 and the numerical value in each cell in the bottom delegation 27 in the B table 24.
After completing steps 18, namely obtained related form B table 24.In application, B table 24 can be kept in the database and to it and distribute a unique report number, preserve then the corresponding relation between the numbering of cell 22 in the A table 21 and B table 24, when being elected to the cell 22 in the middle A table 21, determine the numbering of B table 24 according to this corresponding relation, in database, search then the form with this numbering, obtain B table 24.
In addition, for main form A table 21, its other cells also can as cell 22 have with related form between corresponding relation, according to being similar to the method for obtaining related form B table 24, can obtain simply connected form C table 29 according to cell 28.
According to the method in the embodiment of the invention, the device of corresponding generating report forms as shown in Figure 3.Report generation device 30 is used to generate form among Fig. 3, and it comprises first memory module 31, determination module 32 and generation module 33.Corresponding relation between the zone that first memory module 31 is used for preserving the main form that arranges and the default querying condition, this querying condition are used for the data in the definite related form of database; Can also be further used for the corresponding relation between this zone that arranges corresponding to each the zone preservation in the main form and the related report query conditions of the presetting.Determination module 32 is used for receiving the querying command in the main form of the appointment zone that the user sends, and draws the querying condition corresponding to main form zone of this querying command appointment according to described corresponding relation.Generation module 33 is used for determining that from database the data in the related form generate related form according to these data then according to the related report query conditions of determining.
The classification that first memory module 31 is further used for preserving related report data, like this, determination module 32 is further used for the classification according to related report data, determines to belong to such other data from database.
On the basis of report generation device 30, can also increase second memory module, be used to preserve the main report query conditions of setting, like this, generation module 33 is further used for the data in the related form being inserted corresponding position obtaining related form according to the related statement form that is provided with.
According to technical scheme of the present invention, between the zone of main form and related report query conditions, set up corresponding relation, realize the generation of data acquisition and the related form of related form by in main form, selecting the zone, can select to realize by in main form, carrying out the zone to the inquiry of related form like this, only need present the data query that main form can carry out related form, therefore need not when the related form of each inquiry, to set querying condition, operate comparatively easy; And because the querying condition of related form is for setting in advance, it is errorless that this querying condition can be tested affirmation in advance, thus can guarantee when carrying out the data query of related form, to provide correct querying condition, and then guaranteed the correctness of data query.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (10)

1. a method that generates form is characterized in that, comprising:
For the main form of choosing, zone in the main form and the corresponding relation between the default querying condition are set, described querying condition is used for determining data in the related form from database;
The querying command in main form zone that received appointment that the user sends obtains the querying condition corresponding to main form zone of this querying command appointment according to described corresponding relation;
Determine that according to the querying condition that obtains the data in the related form generate related form according to these data then from database.
2. method according to claim 1 is characterized in that, the zone in the described main form comprises the one or more cells in the main form.
3. method according to claim 1 and 2 is characterized in that, described main form comprises a plurality of zones; Describedly zone in the main form is set and the corresponding relation between the default querying condition comprises for the regional in the main form, the corresponding relation between this zone and the querying condition of presetting is set.
4. method according to claim 1 and 2 is characterized in that described querying condition comprises the classification of related report data;
The querying condition that described basis obtains determines that from database the data in the related form comprise: according to the classification of related report data, determine to belong to such other data from database.
5. method according to claim 1 and 2 is characterized in that described database comprises the data source of described main form;
The querying condition that described basis obtains determines that from database the data in the related form comprise:
According to the querying condition that obtains, from the database of the data source that comprises main form, obtain the data in the related form.
6. method according to claim 1 and 2 is characterized in that, further comprises before the related form of described generation: the form that related form is set;
The related form of described generation comprises according to the related statement form that arranges, the data in the related form is inserted corresponding position obtain related form.
7. a device that generates form is characterized in that, comprising:
Corresponding relation between first memory module, the zone of the main form that be used for to preserve arranges and default querying condition, described querying condition are used for the data in the definite related form of database;
Determination module be used for to receive the querying command in the main form of the appointment zone that the user sends, and draws the querying condition corresponding to main form zone of this querying command appointment according to described corresponding relation;
Generation module is used for determining that from database the data in the related form generate related form according to these data then according to the related report query conditions of determining.
8. device according to claim 7 is characterized in that, described first memory module is further used for the corresponding relation between this zone that arranges corresponding to each the zone preservation in the main form and the querying condition of the presetting.
9. according to claim 7 or 8 described devices, it is characterized in that described first memory module is further used for preserving the classification of related report data;
Then described determination module is further used for the classification according to related report data, determines to belong to such other data from database.
10. according to claim 7 or 8 described devices, it is characterized in that, also comprise second memory module, be used for preserving the form of the related form that arranges;
Described generation module is further used for the data in the related form being inserted corresponding position obtaining related form according to the related statement form that arranges.
CN200810240332A 2008-12-19 2008-12-19 Method and system for generating reports Pending CN101751436A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810240332A CN101751436A (en) 2008-12-19 2008-12-19 Method and system for generating reports

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810240332A CN101751436A (en) 2008-12-19 2008-12-19 Method and system for generating reports

Publications (1)

Publication Number Publication Date
CN101751436A true CN101751436A (en) 2010-06-23

Family

ID=42478427

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810240332A Pending CN101751436A (en) 2008-12-19 2008-12-19 Method and system for generating reports

Country Status (1)

Country Link
CN (1) CN101751436A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118264A (en) * 2010-12-20 2011-07-06 大唐移动通信设备有限公司 Method and device for generating performance report
CN102279951A (en) * 2011-08-16 2011-12-14 中国民生银行股份有限公司 Report information processing method and system
CN103198071A (en) * 2012-01-06 2013-07-10 ***通信集团山东有限公司 Data report generation method and device adopting same
CN103488692A (en) * 2013-09-02 2014-01-01 用友软件股份有限公司 Data query system and data query method
CN103793389A (en) * 2012-10-29 2014-05-14 金蝶软件(中国)有限公司 Method and device for processing query data
CN105069069A (en) * 2015-07-30 2015-11-18 成都亿盟恒信科技有限公司 Method for quickly associating multiple statistical reports
WO2018161402A1 (en) * 2017-03-10 2018-09-13 深圳市科脉技术股份有限公司 Method and system for processing modular packaged reports

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118264A (en) * 2010-12-20 2011-07-06 大唐移动通信设备有限公司 Method and device for generating performance report
CN102118264B (en) * 2010-12-20 2013-08-21 大唐移动通信设备有限公司 Method and device for generating performance report
CN102279951A (en) * 2011-08-16 2011-12-14 中国民生银行股份有限公司 Report information processing method and system
CN103198071A (en) * 2012-01-06 2013-07-10 ***通信集团山东有限公司 Data report generation method and device adopting same
CN103198071B (en) * 2012-01-06 2016-05-25 ***通信集团山东有限公司 Datagram table generating method and device thereof
CN103793389A (en) * 2012-10-29 2014-05-14 金蝶软件(中国)有限公司 Method and device for processing query data
CN103793389B (en) * 2012-10-29 2017-10-24 金蝶软件(中国)有限公司 Inquire about the treating method and apparatus of data
CN103488692A (en) * 2013-09-02 2014-01-01 用友软件股份有限公司 Data query system and data query method
CN105069069A (en) * 2015-07-30 2015-11-18 成都亿盟恒信科技有限公司 Method for quickly associating multiple statistical reports
WO2018161402A1 (en) * 2017-03-10 2018-09-13 深圳市科脉技术股份有限公司 Method and system for processing modular packaged reports

Similar Documents

Publication Publication Date Title
CN101751436A (en) Method and system for generating reports
CN109739934B (en) Difference set account checking method, medium, computer equipment and system
CN108062367B (en) Data list uploading method and terminal thereof
EP2924588B1 (en) Report creation method, device and system
CN103412868B (en) Document generates method and device
CN109446072A (en) The generation method and device of test script
CN104123227A (en) Method for automatically generating testing cases
CN104133772A (en) Automatic test data generation method
CN104348679A (en) Bucket testing method, device and system
CN109582936B (en) Method and device for configuring report information
CN110032451A (en) Distributed multilingual message realization method, device and server
CN102117292B (en) File secondary generates and querying method
CN108664665A (en) Data format method for transformation, device, equipment and readable storage medium storing program for executing
CN111382182A (en) Data processing method and device, electronic equipment and storage medium
CN101976394A (en) Data acquiring and counting system and method
CN105159925B (en) A kind of data-base cluster data distributing method and system
CN109408502A (en) A kind of data standard processing method, device and its storage medium
CN107392560A (en) A kind of Excel list datas issue acquisition method and system based on internet
CN110134398A (en) Analytic method, system and the equipment of list data
CN104243565A (en) Method and device for obtaining configuration data
US11755631B2 (en) Workflow-based dynamic data model and application generation
CN105653273A (en) Personalized customizing method for client function under B/S architecture
CN105930354A (en) Storage model conversion method and device
CA2783290C (en) Systems and methods for table definition language generation
CN103793519A (en) Automatic tool supporting exportation of mass data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20100623