CN109582937A - Report form generation method, device, storage medium and processor - Google Patents

Report form generation method, device, storage medium and processor Download PDF

Info

Publication number
CN109582937A
CN109582937A CN201710894972.3A CN201710894972A CN109582937A CN 109582937 A CN109582937 A CN 109582937A CN 201710894972 A CN201710894972 A CN 201710894972A CN 109582937 A CN109582937 A CN 109582937A
Authority
CN
China
Prior art keywords
report
data
database
configuration
condition
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
CN201710894972.3A
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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum 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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201710894972.3A priority Critical patent/CN109582937A/en
Publication of CN109582937A publication Critical patent/CN109582937A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets

Abstract

The invention discloses a kind of report form generation method, device, storage medium and processors, this method comprises: whether detection current time meets report generation condition;When detecting that current time meets report generation condition, obtain in advance for the report configuration information of report template configuration, which includes: that data extract information and data export position;Information is extracted according to the data, the target data needed for extracting generation report in database;Position is exported according to the data, which is exported in the report template, the report generated needed for obtaining.The scheme of the application can reduce the complexity of report generation, improve report generation efficiency.

Description

Report form generation method, device, storage medium and processor
Technical field
The present invention relates to technical field of data processing more particularly to a kind of report form generation method, device, storage medium and places Manage device.
Background technique
In information management procedure, it is often necessary to display data in the form of statements.Such as, it during job rating, needs Show the work achievement and related data of employee, by way of report in order to statistically analyze.
In many cases, it may be necessary to periodically generation report, e.g., weekly or the every month of exhibition by way of report Show the data of the period.However, the configuration for requiring first to carry out basis to report operates when generating report every time, and e.g., configuration Generate the storage address of data involved by report, data filtering condition etc., so as to cause the process of report is generated more Complexity affects report generation efficiency.
Summary of the invention
In view of the above problems, overcome the above problem the present invention provides a kind of or at least be partially solved the above problem Report form generation method, device, storage medium and processor improve report generation efficiency to reduce the complexity of report generation.
In order to achieve the goal above, this application provides a kind of report form generation methods, comprising:
Whether detection current time meets report generation condition;
When detecting that current time meets report generation condition, obtains the report in advance for report template configuration and match confidence Breath, the report configuration information include: that data extract information and data export position;
Information is extracted according to the data, the target data needed for extracting generation report in database;
Position is exported according to the data, the target data is exported in the report template, required generation is obtained Report.
Preferably, described to extract information according to the data, the target data needed for extracting generation report in database, Include:
Information is extracted based on the data, generates query sentence of database;
Database is sent by the query sentence of database, so that the database executes the data base querying language Sentence, reads out the target data.
Preferably, whether the detection current time meets report generation condition, comprising:
According to the preset report generation period, whether detection currently reaches the preset report generation moment;
Alternatively, whether detection currently receives report generation instruction.
Preferably, before whether the detection current time meets report generation condition, further includes:
Column included in the tables of data and tables of data that inquiry database includes;
The column name of column included in table name and tables of data based on the tables of data inquired shows report configuration Interface, the report configuration interface are used to show the table name of the alternative tables of data, column name of column, a variety of for configuring The condition config option of data filtering condition and the position setting choosing that the position range in report is exported to for configuration data ?;
At least one target matrix selected in the report configuration interface according to user and the target data At least one target column and user in table are operated for the configuration of the condition config option, are obtained and are generated for determining The data of data needed for report extract information;
The configuration of position setting options in the report configuration interface is operated according to user, obtains and is extracted for determination Data of the data in report template export position;
The data are extracted into information and data export position is stored as the associated report configuration of the report template Information generates report in the report template in order to be based on the report configuration information.
Preferably, column included in the tables of data and tables of data that the inquiry database includes, comprising:
By calling preset plug-in unit to connect with Database, and from database the tables of data of inquiry database and The column name for the column for including in tables of data.
On the other hand, present invention also provides a kind of report generation devices, comprising:
Condition detection unit, for detecting whether current time meets report generation condition;
Acquiring unit is configured, is in advance report mould for obtaining when detecting that current time meets report generation condition The report configuration information of plate configuration, the report configuration information include: that data extract information and data export position;
Data extracting unit, for extracting information according to the data, the mesh needed for extracting generation report in database Mark data;
The target data is exported to the report mould for exporting position according to the data by data lead-out unit In plate, the report of generation needed for obtaining.
Preferably, the data extracting unit, comprising:
Sentence generates subelement, for extracting information based on the data, generates query sentence of database;
Sentence executes subelement, for sending database for the query sentence of database, so that the database The query sentence of database is executed, the target data is read out.
Preferably, further includes:
Data base querying unit, for whether meeting report generation condition at condition detection unit detection current time Before, column included in the tables of data and tables of data that inquiry database includes;
Interface shows unit, the column for column included in table name and tables of data based on the tables of data inquired Title, shows report configuration interface, and the report configuration interface is used to show the column of the table name of alternative tables of data, column Title a variety of exports to the position in report for the condition config option of configuration data filter condition and for configuration data The position setting options of range;
First configuration unit, at least one target data for being selected in the report configuration interface according to user At least one target column and user in table and the target matrix are operated for the configuration of the condition config option, It obtains and extracts information for the data of data needed for determining generation report;
Second configuration unit, for being operated according to user to the configuration of position setting options in the report configuration interface, Obtain the data export position for determining the data extracted in report template;
Information memory cell, for data extraction information and data export position to be stored as the report mould The associated report configuration information of plate generates report in the report template in order to be based on the report configuration information.
On the other hand, present invention also provides a kind of storage medium, the storage medium includes the program of storage, wherein Equipment described program controls the storage medium when running where executes as above described in any item report form generation methods.
On the other hand, present invention also provides a kind of processors, and the processor is for running program, wherein the journey As above described in any item report form generation methods are executed when sort run.
By above-mentioned technical proposal, in the embodiment of the present application, as being in advance that report template is configured with needed for generating report Report configuration information, the report configuration information include data extract information and data export position, in this way, needing to generate When report, only need to according in advance for report template configuration data extract information, from database extract generate report needed for Target data, and position is exported according to the data, the target data extracted is exported in the report template, it can be direct Report needed for generating avoids complexity needed for generating report every time in this way, may be implemented repeatedly to be multiplexed by once configuration Information configuration, reduce the complexity of report generation, also improve the efficiency of report generation.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of flow diagram of report form generation method one embodiment of the application;
Fig. 2 shows a kind of realizations in a kind of report form generation method of the application being report template configuration report configuration information Flow diagram;
Fig. 3 a shows a kind of schematic diagram of the data source allocation window in report configuration interface;
Fig. 3 b shows the schematic diagram in report configuration interface for a kind of condition allocation window of setup time range;
Fig. 3 c shows a kind of schematic diagram that the position allocation window of data export position is set in report configuration interface;
Fig. 4 shows a kind of flow diagram of another embodiment of report form generation method of the application;
Fig. 5 shows a kind of composed structure schematic diagram of report generation device one embodiment of the application.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
Application scheme is related to the generation of report, and report is with formats such as table, charts come Dynamically Announce data.This Shen Scheme please can reduce the complexity of report generation, improve report generation efficiency.
Such as, referring to Fig. 1, it illustrates a kind of flow diagram of report form generation method one embodiment of the application, this realities The method for applying example can be applied to any computer equipment, and this method may include:
Whether S101, detection current time meet report generation condition.
Wherein, which can be set as needed.Such as, when can set multiple and different report generations Between;For another example, a report generation period can be set, can detect currently whether meet report according to the report generation period Generate the moment, so as to periodically from taken out in database generate report needed for data, and complete report generation.
It is of course also possible to be from user as needed to computer equipment input report generation instruction, correspondingly, can examine Survey whether current time receives report generation instruction, and when receiving report generation instruction, determination meets report generation item Part.
S102, when detect meet report generation condition when, obtain in advance for report template configuration report configuration information.
Wherein, in the embodiment of the present application, the report configuration information for being report template configuration is based on report template life At some configuration informations needed for report, after being pre-configured with and storing the report configuration information, then without weighing every time Report configuration information needed for compounding sets generation report.
Such as, which includes at least: data extract information and data export position.
Wherein, data are extracted information and are extracted for determining from database for generating satisfaction needed for the target data of report Condition.Such as, it may include: in data source (e.g., at least one target matrix) for generating report which, which extracts information, Target column target column name, and to the data screening condition etc. that data in target column pointed by target column name are screened Deng.
In the embodiment of the present application, for the ease of distinguishing, column belonging to data needed for generating report are known as target column, And the title of the target column is known as target column name.Data needed for being used to generate report are known as target data.
Correspondingly, the data filtering condition is exactly to the number in the tables of data and tables of data in database in the target column According to the condition being filtered.Such as, data screening condition may include the condition that the tables of data where target data needs to meet, with And one of filter condition met needed for the target column where target data etc. or a variety of.Wherein, full needed for tables of data The condition of foot can belong within the scope of corresponding specified time at current time for the generation time of tables of data, for example, it is assumed that currently Moment is the report generation moment, then the tables of data where target data needs the number generated in the last week for the current time According to, wherein the time that generates of tables of data is generation time of the tables of data in database.Wherein, the target where the target data The filter condition met needed for column can meet preset condition for the value of each field in target column.For example, being with column name For the length of service, filter condition can be greater than the data of 10 years employees for the length of service.
Wherein, data export location information is for determining that target data exports to the position in report.Such as, data need Which any it is stored in unit lattice region of worksheet of report.
S103 extracts information according to the data, the target data needed for extracting generation report in database.
Such as, the column that information includes: the table name of at least one target matrix, at least one target column are extracted in data Name, and to the data screening condition that the data at least one target column at least one target matrix are screened When, then it is determined in the target matrix from database, at least one target column corresponding at least one target column name;So Afterwards, it is based on the data screening condition, from data included at least one target column, screening meets the number of targets of condition According to.
Certainly, data filtering condition further include satisfaction needed for tables of data condition (e.g., the generation time of tables of data or The condition etc. met needed for title) when, then the target matrix for the condition that meets first is determined, then should be to from target matrix In data included in a few target column, screening meets the target data of condition.
In one possible implementation, tables of data, target column included in information can be extracted based on the data And the condition met needed for the data in target column, generate the inquiry language for target data needed for extracting generation report Sentence, e.g., which can be SQL statement;It is then possible to query statement is sent to database, so that database is logical It crosses and executes the query statement, inquire target data needed for generating report, and return to the target data.
It is understood that in the scene for needing to periodically generate report, in bases such as table name, the column names of tables of data In the case that plinth information does not change, it is unaffected for the data extraction information of report template configuration, to guarantee Primary configuration can be repeatedly multiplexed.
S104 exports position according to the data, which is exported in the report template, generates needed for obtaining Report.
Wherein, associative mode needed for being already provided with report in the report template, for example, report style, required to use Formula etc., in this way, exporting position according to data, after the target data extracted is exported to report template, To obtain required report.
As it can be seen that in the embodiment of the present application, the report as needed for being configured with generation report in advance for report template configures Information, the report configuration information include data extraction information and data export position, in this way, when needing to generate report, only It needs to extract information according to the preparatory data for report template configuration, the target data needed for extracting generation report in database, And position is exported according to the data, the target data extracted is exported in the report template, needed for can directly generating Report avoid the information of complexity needed for generating report every time in this way, may be implemented repeatedly to be multiplexed by once configuration and match It sets, reduces the complexity of report generation, also improve the efficiency of report generation.
The scheme of the application in order to facilitate understanding configures the mistake of report messages for report template to before generating report Journey is introduced.
Such as, referring to fig. 2, it illustrates be that report template configures report configuration information in a kind of report form generation method of the application A kind of flow diagram, the embodiment of the present application can be applied to the computer equipment for arbitrarily having data processing function, the meter Report can be generated based on preconfigured report template by calculating machine equipment.The method of the present embodiment may include:
S201 inquires column included in the tables of data and tables of data that database includes.
It is understood that report is with formats such as table, charts come Dynamically Announce data, and needed to generate report Determine data source, i.e., which data is for generating report in database, and therefore, it is necessary to determine by inquiry database Which which, comprising having column in tables of data and tables of data in database, chosen from tables of data and each column so as to subsequent Required data out.Wherein, the column in tables of data are referred to as field.
It is suitable for the case where report is generated based on report template in the scheme of the embodiment of the present application, in that case, is Configuration report messages are actually configuration information needed for report template configuration generates report.
Such as, when meeting configuration report messages condition, step S201 is executed.Wherein, the condition of the configuration report messages Can be there are many possibility, it in one implementation, can be after showing report template, by user's trigger data library inquiry Request, in response to included in database table included in data inquiry request inquiry database and each tables of data The information such as field.Such as, when detect user click computer equipment in specified button or touching by preset in report template When icon or key, then computer equipment generates data base querying request, and data base querying request is sent to database, To inquire the information such as the title of field and record for including in the tables of data and tables of data for including in database.
Wherein, from database inquire database tables of data and field information specific implementation can have it is more Kind, e.g., can the preset plug-in unit that can be connect with Database call the plug-in unit, and lead to and when needing to inquire database It crosses the plug-in unit to connect with Database, to inquire the information such as tables of data included in database.
S202, the column name of column included in table name and tables of data based on the tables of data inquired, shows report Table configuration interface.
The report configuration interface is the interface of configuration information needed for configuration generates report.
In order to realize the complexity for reducing configuration report messages, which is not programming circle Face, in the report configuration interface for showing the table name of alternative tables of data and the column name of column, and the report configures Interface also shows there are many condition config option for configuration data filter condition and exports to report for configuration data In position range position setting options.
It is understood that as in report configuration interface by the table name and number of tables of data included in database According in table comprising column column name show, in this way, user can according to generate report needed for data source, from report configure It is selected in interface in tables of data and tables of data for generating report for generating the column where the data of report, it is seen then that It is only necessary to simply select can to complete the selected operation of data source by user.
Wherein, the partial data in data source be user wish generate report data, it is seen then that determine data source it Afterwards, it is still desirable to the data of the condition of satisfaction are filtered out from data source, and the condition met needed for garbled data is exactly data mistake Filter condition.In practical applications, data filtering condition may include a variety of, e.g., the generation time institute of tables of data in the database The condition that need to meet;The querying condition met needed for field in data source, for example, querying condition can so that field is the length of service as an example Think that the length of service is greater than 10 years etc..Certainly, which can also have other possibility, without restriction herein.
Correspondingly, a variety of condition config options in report configuration interface can be used to implement to data filtering item not of the same race The option that part is configured, user choose the condition config option, or the drop-down list from condition config option by clicking It is middle to select corresponding configuration item to complete the selection or configuration of filter condition, even if in this way, user does not know about relevant configuration Function also can according to need the optional item in alternative condition config option or condition config option.
Such as, every kind of condition config option can be the option that can be selected, to configure needed for the data for generating report For the generation time of satisfaction, which can be the option of generation time, for example, yesterday, today or tomorrow Equal options, then, if it is desired to which data in the tables of data of the previous day to get Date generate report, then can choose yesterday Its this time option.
It for another example, may include multiple alternative objects, the different number of different object characterizations in condition config option According to filtration needs, still it is illustrated by taking the generation time of satisfaction needed for the data that configuration generates report as an example, if necessary to limit The generation time of tables of data for generating report is some period, then may include setting starting in the report configuration interface The condition config option of time and setting terminate the condition config option of time, can show in the two condition config options Not same date is shown to select for user, user be can according to need in initial time and be terminated in the condition config option of time The corresponding date is selected, the tables of data generated between the two dates is the tables of data needed for generating report.
Correspondingly, position setting options and condition config option type, position setting options can be used for being arranged data and lead Position into report template out, user is set setting options or set in place by selected bit selects corresponding side in setting options The position exported in report template desired by data can be set in boundary position.For example, position setting options may include: to be The no option comprising title bar, and the options etc. for list where setting export position.
It is understood that in the embodiment of the present application, report configuration interface can show above alternative simultaneously Column name, condition config option and the position setting options for the column for including in the table name of tables of data, tables of data.In order to The function of different setting options is distinguished, in order to which user is more intuitive, configuration information is easily arranged, the report configuration interface It can also include the multiple window interfaces for realizing different configuration features, option shown by each window interface or content are not Together.
Such as, which may include: data source allocation window, position allocation window and at least one condition Allocation window, wherein the data source allocation window shows the column name of the table name and column that have alternative tables of data;This Part allocation window shows there are many condition config option;The position allocation window includes multiple position setting options.Wherein, at this The corresponding window name of different allocation windows can be shown in report configuration interface, for clicking the window of some allocation window Title, so that it may show corresponding allocation window.For example, be used for the title of click data source allocation window, then it can be at this The data source allocation window is shown in report configuration interface, so that user can show in the data source allocation window Tables of data and column title in, select required tables of data and column.Specifically, may refer to Fig. 3 a, it specifically can be rear It is introduced in the embodiment of face.
S203, at least one target matrix selected in the report configuration interface according to user and the target data At least one target column and user in table are operated for the configuration of the condition config option, are obtained and are generated report for determining The data of data needed for table extract information.
Wherein, for the ease of distinguishing, the tables of data that user selects from the report configuration interface is known as target data Table, the column that user is selected are known as target column.
Wherein, which extracts the foundation that information is the data needed for extracting generation report in database, according to the data Extracting information can determine which data needs extract from database to generate report.
It is understood that it includes: at least one target matrix and number needed for generating report that the data, which extract information, According in table for generating the information of at least one target column where the data of report, further includes: be directed at least one target The data filtering condition that the data in target column in tables of data are screened.
S204 operates the configuration of position setting options in the report configuration interface according to user, obtains and mention for determination Data of the data of taking-up in report template export position.
Wherein, data export position operates in the report configuration interface for the configuration of position setting options according to user To determine e.g., whether be in selected state, the letter such as regional scope of the selection in the setting options of position according to position setting options Breath analyzes the region for being used to export data for belonging to user setting in report template, to export the region as data Position.
Such as, data export position can arrange the region arranged to the 10th row the 12nd for the 2nd row the 2nd in report template.
Wherein, report template is the template for generating report, figure needed for being prefixed report in the report template Shape pattern, formula etc. information.
The data are extracted information and data export position are stored as the associated report of the report template with confidence by S205 Breath generates report in the report template in order to be based on the report configuration information.
Using the data extract information and data export position as report configuration information and the report template associated storage it Afterwards, it is subsequent if necessary to generate report configuration information using the report template when, then configure the report with confidence without repeating Breath inquires the data for generating report so as to be directly based upon the report configuration information from database, and by data Corresponding region in the report template is exported to, to complete report generation.
As it can be seen that report configuration information needed for generating report if necessary to configuration, then can inquire included in database Tables of data and column, and show report configuration interface, due to showing alternative tables of data in the report configuration interface Table name and the tables of data column that include column name, in this way, user directly can select use in the report configuration interface In target matrix and target column where the data for generating report, to be conducive to easily configure the data for generating report Source.Simultaneously as exhibition is currently used for a variety of conditions configurations for configuration data filter condition of configuration number in report configuration interface Option and the position setting options that the position range in report is exported to for configuration data, in this way, user is directly to condition Config option and position setting options carry out relevant selection operation, can determine to meet needed for generating the data of report Condition and data required derived export position can also be complete without the programming operation of user's complexity in report The configuration of pairs of report, reduces the complexity of configuration report messages.
And by it is above it is primary configure after, when meeting report generation condition, then can directly acquire by with The report configuration information of upper type configuration, and report generation is carried out based on the report configuration information, to be conducive to improve report The efficiency of generation.
It further, include data source configuration with report configuration interface in order to understand the scheme of the application in more detail It is introduced for window, position allocation window and at least one condition allocation window.
Such as, referring to fig. 4, it illustrates a kind of flow diagrams of another embodiment of report form generation method of the application, originally The method of embodiment may include:
S401, by calling preset plug-in unit, inquires the number for including in database when detecting report messages configuring request According to the column name for each column for including in the table name and tables of data of table.
Such as, user generates report messages configuring request by clicking specified button, triggering computer equipment.
Wherein, it can be connect with Database by the plug-in unit for calling this preset, and from data base querying related data The information of column in table and tables of data.
It is understood that the mode of triggering inquiry database is applied equally to the present embodiment by other means.Phase It answers, it is also a kind of implementation that database is inquired by calling preset plug-in unit, other corresponding implementations are also suitable In the present embodiment.
S402, the column of column included in table name and each tables of data based at least one tables of data inquired Title shows report configuration interface, and shows data source allocation window in report configuration interface.
Wherein, which shows the column name of the table name and column that have alternative tables of data.
Such as, which can show the table name of each tables of data and each respectively in the form of option The column name of a column can then click corresponding option if the user desired which column name selected.
For another example, tables of data drop-down list and column drop-down list can be shown respectively in the data source allocation window, from And the table name and each column column name of each tables of data are shown by way of drop-down list, user can be in tables of data Drop-down list in select required tables of data, and in column drop-down list selection target arrange column name.
In order to make it easy to understand, may refer to Fig. 3 a, it illustrates report configuration interfaces in the application and report to configure boundary A kind of schematic diagram of data source allocation window in face, by Fig. 3 a it is found that report configuration interface 301 may include multiple and different Allocation window, e.g., what is shown in fig. 3 a is data source allocation window 302, which configures in the report Window name in interface is " tables of data ".Data table name display field is shown in the data source allocation window 302, at this Data table name display field can show the title for the target matrix that user selects, such as " test " in Fig. 3 a;The number Column name display field (being not shown in Fig. 3 a) can also be opened up according to source allocation window 302.
S403 obtains at least one target matrix and target matrix that user selects in data source allocation window In at least one target column.
S404 is configured when detecting that user clicks the title of the condition allocation window in report configuration interface in report Show condition allocation window in interface.
It wherein, include at least one condition config option in the condition allocation window.
Certainly, user clicks the title of the condition allocation window, shows this in the report configuration interface to trigger Part configuration interface is only a kind of implementation, and the mode for showing condition configuration interface for other triggerings is applied equally to this Embodiment.
It is understood that data filtering condition can there are many, correspondingly, the report configuration interface conditional configure window Mouthful can also there are many.
Such as, which at least may include: temporal filtering window and filter condition window.Wherein, this when Between filter window be used for configure generate report target matrix needed for satisfaction generation time range, in the temporal filtering window Condition config option can be time Filter Options, which can be used for being arranged the generation met needed for report Time.
Wherein, which is used for configuration pin looking into the data in target matrix at least one target column Inquiry condition.Correspondingly, the condition config option in the filter condition window can be filter condition config option, e.g., filtering rod Part config option may include " and ", " > ", "=" etc., and user needs to select filter condition configuration choosing according to actual disposition , and establish the functional relation between field and filter condition config option.Such as, user needs to be arranged the value of field and is Setting value then can input or select the field name of the field in the filter condition window, then configurating filtered condition Config option is equal to and inputting setting value, can complete the setting of a data filter condition.
S405 is grasped at least one condition allocation window for the configuration of at least one condition config option according to user Make, determines the data filtering condition being filtered for the data at least one target column in the target matrix.
Such as, it is included at least by condition allocation window:, then can foundation for temporal filtering window and filter condition window User operates in temporal filtering window for the selection of time of time Filter Options, determines the target data for generating report The generation time range met needed for table;Correspondingly, according to user for filter condition configuration choosing in the filter condition window The configuration operation of item, determines the querying condition for the data at least one target column in tables of data.
In order to make it easy to understand, being illustrated by taking temporal filtering window as an example, as shown in Figure 3b, in the temporal filtering window 303 window name in report configuration interface 301 is " time ".There are many different times in the temporal filtering window to sieve Option, e.g., " yesterday ", " day before yesterday ", " this month " and " customized " etc., if user is only it needs to be determined that generate the data of report For the time for being equivalent to current date, then it can according to need and click pre-set time Filter Options, e.g., " yesterday It ", " this month " etc., then the generations time range met needed for tables of data can be the previous day or the current date of current date The moon at place.If the user desired that defining a time range at random, then " customized " option can be clicked, is then being made by oneself Justice associated time configuration selects required time range in column, e.g., from July 15,1 day to 2017 July in 2017.
It is similar with temporal filtering window for the configuration of filter condition window, it can equally be supplied to a variety of fixations of user and set The config option and a variety of customized config options set are not added herein for data filtering condition needed for user configuration With limitation.
S406, by the column name of the table name of at least one target matrix and at least one target column, and should Data filtering condition is determined as data and extracts information.
S407 is configured when detecting that user clicks the title of the position allocation window in report configuration interface in report Show position allocation window in interface.
Wherein, which includes multiple position setting options.By the position, position is can be set in setting options Set range.
For example, such as showing a kind of schematic diagram of position allocation window referring to Fig. 3 c, report configures boundary in figure 3 c Entitled " the Export Option " of position allocation window 304 in face 301.It in the position include multiple positions in allocation window 304 Config option, e.g., " derived book " can choose data and need to export in that book.For another example " whether include mark Whether topic row ", " include summary row " can characterize in the target data for need to generate report whether comprising header line or to summarize Row so that system can in target data whether include header line and summary row information, to adjust leading for user configuration The region of out position.For example, it is assumed that can determine that export position is work according to configuration of the user to other positions config option The cell region of preceding 4 row and the constituted 4*4 of preceding 4 column in table, if wrapped in derived target data needed for user configuration Containing header line, then need to move down in the former export position of worksheet, so that reserving a line for exporting mesh above former export position Mark data header line so that export position from preceding 4 row and it is preceding 4 column constitute 4*4 cell region, be changed to from The cell region of preceding 5 column and the constituted 5*4 of preceding 4 column.Wherein, " export mode " can also set from book which Location point starts to export data.As it can be seen that can determine that data need to export by this variety of different position config option In to any partial region of which book and book.
S408 operates the configuration of the position setting options in the position allocation window according to user, determines user configuration Data export position.
Wherein, data export position is exported to for determining the data extracted from least one target matrix Position range in the report template.
409, which is extracted into information and data export position is stored as the associated report of the report template with confidence Breath.
It should be noted that above step S401 is intended merely to facilitate the report for understanding the embodiment of the present application to step S409 Table generating method and the introduction carried out, but it is understood that, above step requires when not executing report generation every time It executes, and need to only execute once, when being subsequently generated report, then no longer need to repeat.
S410 is obtained in advance when meeting report generation condition as the report configuration information of report template configuration.
Wherein, which includes: that data extract information and data export position, wherein data extract information It include: the table name of at least one target matrix and the column name of at least one target column and the data filtering condition.
S411 is extracted from least one target column of at least one target matrix and is met the data filtering item The target data of part.
It alternatively, can be first according to the table name of at least one target matrix, at least one mesh The column name and the data filtering condition for marking column, generate query sentence of database, such as SQL statement, specifically, can be preset The create-rule of query sentence of database, for example, different filling positions in different parameters correspondence database query statement, thus will Relevant parameter is filled into the query sentence of database to be generated, obtains query sentence of database.
S412 exports position according to the data, which is exported in the report template, generates needed for obtaining Report.
A kind of report form generation method of corresponding the application, present invention also provides a kind of report generation devices.
Referring to Fig. 5, it illustrates a kind of composed structure schematic diagram of report generation device one embodiment of the application, this realities The device for applying example may include:
Condition detection unit 501, for detecting whether current time meets report generation condition;
Acquiring unit 502 is configured, is in advance report for obtaining when detecting that current time meets report generation condition The report configuration information of template configuration, the report configuration information include: that data extract information and data export position;
Data extracting unit 503 generates needed for report for extracting information according to the data from extraction in database Target data;
The target data is exported to the report for exporting position according to the data by data lead-out unit 504 In template, the report of generation needed for obtaining.
In one implementation, the data extracting unit, comprising:
Sentence generates subelement, for extracting information based on the data, generates query sentence of database;
Sentence executes subelement, for sending database for the query sentence of database, so that the database The query sentence of database is executed, the target data is read out.
In one implementation, described device can also include:
Data base querying unit, for whether meeting report generation condition at condition detection unit detection current time Before, column included in the tables of data and tables of data that inquiry database includes;
Interface shows unit, the column for column included in table name and tables of data based on the tables of data inquired Title, shows report configuration interface, and the report configuration interface is used to show the column of the table name of alternative tables of data, column Title a variety of exports to the position in report for the condition config option of configuration data filter condition and for configuration data The position setting options of range;
First configuration unit, at least one target data for being selected in the report configuration interface according to user At least one target column and user in table and the target matrix are operated for the configuration of the condition config option, It obtains and extracts information for the data of data needed for determining generation report;
Second configuration unit, for being operated according to user to the configuration of position setting options in the report configuration interface, Obtain the data export position for determining the data extracted in report template;
Information memory cell, for data extraction information and data export position to be stored as the report mould The associated report configuration information of plate generates report in the report template in order to be based on the report configuration information.
Optionally, in the embodiment of the present application, the condition detection unit, specifically, for raw according to preset report At the period, whether detection currently reaches the preset report generation moment;Refer to alternatively, whether detection currently receives report generation It enables.
The report generation device includes processor and memory, above-mentioned condition detection unit, configuration acquiring unit, data Extraction unit and data lead-out unit etc. store in memory as program unit, are stored in memory by processor execution In above procedure unit realize corresponding function.
Include kernel in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can be set one Or more, automatic report generation is realized by adjusting kernel parameter, to improve report generation efficiency, reduces answering for report generation Miscellaneous degree.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, if read-only memory (ROM) or flash memory (flash RAM), memory include that at least one is deposited Store up chip.
The embodiment of the invention provides a kind of storage mediums, are stored thereon with program, wherein running time control in described program Equipment where making the storage medium executes the report form generation method as described in any one embodiment.
The embodiment of the invention provides a kind of processor, the processor is for running program, wherein described program operation Report form generation method described in Shi Zhihang any one embodiment as above.
The embodiment of the invention provides a kind of equipment, equipment include processor, memory and storage on a memory and can The program run on a processor, processor perform the steps of when executing program
Whether detection current time meets report generation condition;
When detecting that current time meets report generation condition, obtains the report in advance for report template configuration and match confidence Breath, the report configuration information include: that data extract information and data export position;
Information is extracted according to the data, the target data needed for extracting generation report in database;
Position is exported according to the data, the target data is exported in the report template, required generation is obtained Report.
Wherein, described to extract information according to the data, the target data needed for extracting generation report in database, packet It includes:
Information is extracted based on the data, generates query sentence of database;
Database is sent by the query sentence of database, so that the database executes the data base querying language Sentence, reads out the target data.
Wherein, whether the detection current time meets report generation condition, comprising:
According to the preset report generation period, whether detection currently reaches the preset report generation moment;
Alternatively, whether detection currently receives report generation instruction.
Equipment herein can be server, PC, PAD, mobile phone etc..
Present invention also provides a kind of computer program products, when executing on data processing equipment, are adapted for carrying out just The program of beginningization there are as below methods step:
Whether detection current time meets report generation condition;
When detecting that current time meets report generation condition, obtains the report in advance for report template configuration and match confidence Breath, the report configuration information include: that data extract information and data export position;
Information is extracted according to the data, the target data needed for extracting generation report in database;
Position is exported according to the data, the target data is exported in the report template, required generation is obtained Report.
Wherein, described to extract information according to the data, the target data needed for extracting generation report in database, packet It includes:
Information is extracted based on the data, generates query sentence of database;
Database is sent by the query sentence of database, so that the database executes the data base querying language Sentence, reads out the target data.
Wherein, whether the detection current time meets report generation condition, comprising:
According to the preset report generation period, whether detection currently reaches the preset report generation moment;
Alternatively, whether detection currently receives report generation instruction.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art, Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement, Improve etc., it should be included within the scope of the claims of this application.

Claims (10)

1. a kind of report form generation method characterized by comprising
Whether detection current time meets report generation condition;
When detecting that current time meets report generation condition, the report configuration information configured in advance for report template is obtained, The report configuration information includes: that data extract information and data export position;
Information is extracted according to the data, the target data needed for extracting generation report in database;
Position is exported according to the data, the target data is exported in the report template, the report generated needed for obtaining Table.
2. report form generation method according to claim 1, which is characterized in that it is described to extract information according to the data, from Target data needed for generating report is extracted in database, comprising:
Information is extracted based on the data, generates query sentence of database;
Database is sent by the query sentence of database, so that the database executes the query sentence of database, Read out the target data.
3. report form generation method according to claim 1, which is characterized in that whether the detection current time meets report Formation condition, comprising:
According to the preset report generation period, whether detection currently reaches the preset report generation moment;
Alternatively, whether detection currently receives report generation instruction.
4. report form generation method according to claim 1, which is characterized in that whether meet report at the detection current time Before table formation condition, further includes:
Column included in the tables of data and tables of data that inquiry database includes;
The column name of column included in table name and tables of data based on the tables of data inquired shows report configuration circle Face, the report configuration interface are used to show the table name of the alternative tables of data, column name of column, a variety of for configuring number The position setting options of the position range in report are exported to according to the condition config option of filter condition and for configuration data;
In at least one target matrix and the target matrix selected in the report configuration interface according to user At least one target column and user for the condition config option configuration operate, obtain for determine generate report The data of required data extract information;
The configuration of position setting options in the report configuration interface is operated according to user, is obtained for determining the number extracted Position is exported according to the data in report template;
The data are extracted into information and data export position is stored as the associated report configuration information of the report template, In order to be based on the report configuration information, report is generated in the report template.
5. report form generation method according to claim 4, which is characterized in that the inquiry database tables of data that includes with And it is arranged included in tables of data, comprising:
It is connect by the preset plug-in unit of calling with Database, and inquires the tables of data and data of database from database The column name for the column for including in table.
6. a kind of report generation device characterized by comprising
Condition detection unit, for detecting whether current time meets report generation condition;
Acquiring unit is configured, for when detecting that current time meets report generation condition, acquisition to be matched in advance for report template The report configuration information set, the report configuration information include: that data extract information and data export position;
Data extracting unit, for extracting information according to the data, the number of targets needed for extracting generation report in database According to;
Data lead-out unit, for according to data export position, the target data to be exported in the report template, The report generated needed for obtaining.
7. report generation device according to claim 6, which is characterized in that the data extracting unit, comprising:
Sentence generates subelement, for extracting information based on the data, generates query sentence of database;
Sentence executes subelement, for sending database for the query sentence of database, so that the database executes The query sentence of database reads out the target data.
8. report generation device according to claim 1, which is characterized in that further include:
Data base querying unit, for the condition detection unit detection current time whether meet report generation condition it Before, column included in the tables of data and tables of data that inquiry database includes;
Interface shows unit, the column name for column included in table name and tables of data based on the tables of data inquired Claim, show report configuration interface, the report configuration interface is used to show table name, the column name of column of alternative tables of data Claim, a variety of position models exported to for the condition config option of configuration data filter condition and for configuration data in report The position setting options enclosed;
First configuration unit, at least one target matrix for being selected in the report configuration interface according to user and At least one target column and user in the target matrix are operated for the configuration of the condition config option, are obtained Data for data needed for determining generation report extract information;
Second configuration unit is obtained for operating according to user to the configuration of position setting options in the report configuration interface For determining that data of the data extracted in report template export position;
Information memory cell, for data extraction information and data export position to be stored as the report template and close The report configuration information of connection generates report in the report template in order to be based on the report configuration information.
9. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein in described program operation Equipment where controlling the storage medium executes as above report form generation method of any of claims 1-5.
10. a kind of processor, which is characterized in that the processor is for running program, wherein executed such as when described program is run Upper report form generation method of any of claims 1-5.
CN201710894972.3A 2017-09-28 2017-09-28 Report form generation method, device, storage medium and processor Pending CN109582937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710894972.3A CN109582937A (en) 2017-09-28 2017-09-28 Report form generation method, device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710894972.3A CN109582937A (en) 2017-09-28 2017-09-28 Report form generation method, device, storage medium and processor

Publications (1)

Publication Number Publication Date
CN109582937A true CN109582937A (en) 2019-04-05

Family

ID=65913012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710894972.3A Pending CN109582937A (en) 2017-09-28 2017-09-28 Report form generation method, device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN109582937A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110232178A (en) * 2019-05-29 2019-09-13 北京中亦安图科技股份有限公司 Report generation method and device
CN110516217A (en) * 2019-08-09 2019-11-29 济南浪潮数据技术有限公司 A kind of auto report completing method and device
CN111090974A (en) * 2019-12-27 2020-05-01 中国银行股份有限公司 Report generation method, device and equipment
CN111177231A (en) * 2019-12-20 2020-05-19 中国建设银行股份有限公司 Report generation method and report generation device
CN111291544A (en) * 2020-01-13 2020-06-16 中国建设银行股份有限公司 Report generation method and device, electronic equipment and storage medium
CN111401023A (en) * 2020-03-13 2020-07-10 浙江中控技术股份有限公司 Report generation method and device, server and storage medium
CN112347749A (en) * 2019-08-06 2021-02-09 南通深南电路有限公司 Data processing method, data processing equipment and data processing system
CN115146006A (en) * 2022-08-22 2022-10-04 东方合智数据科技(广东)有限责任公司 Report statistical method and related equipment for corrugated paper packaging industry

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102368261A (en) * 2011-10-14 2012-03-07 成都勤智数码科技有限公司 Expandable running maintenance report generation method
CN104036040A (en) * 2014-06-30 2014-09-10 贝壳网际(北京)安全技术有限公司 Method and device for generating report
CN104573065A (en) * 2015-01-23 2015-04-29 广东能龙教育股份有限公司 Report display engine based on metadata
US20160147751A1 (en) * 2014-11-25 2016-05-26 International Business Machines Corporation Generating an index for a table in a database background
CN105718495A (en) * 2015-08-21 2016-06-29 哈尔滨安天科技股份有限公司 Exporting method and system of database hierarchical HTML (Hypertext Markup Language) statement

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102368261A (en) * 2011-10-14 2012-03-07 成都勤智数码科技有限公司 Expandable running maintenance report generation method
CN104036040A (en) * 2014-06-30 2014-09-10 贝壳网际(北京)安全技术有限公司 Method and device for generating report
US20160147751A1 (en) * 2014-11-25 2016-05-26 International Business Machines Corporation Generating an index for a table in a database background
CN104573065A (en) * 2015-01-23 2015-04-29 广东能龙教育股份有限公司 Report display engine based on metadata
CN105718495A (en) * 2015-08-21 2016-06-29 哈尔滨安天科技股份有限公司 Exporting method and system of database hierarchical HTML (Hypertext Markup Language) statement

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110232178A (en) * 2019-05-29 2019-09-13 北京中亦安图科技股份有限公司 Report generation method and device
CN112347749A (en) * 2019-08-06 2021-02-09 南通深南电路有限公司 Data processing method, data processing equipment and data processing system
CN110516217A (en) * 2019-08-09 2019-11-29 济南浪潮数据技术有限公司 A kind of auto report completing method and device
CN111177231A (en) * 2019-12-20 2020-05-19 中国建设银行股份有限公司 Report generation method and report generation device
CN111177231B (en) * 2019-12-20 2023-09-22 中国建设银行股份有限公司 Report generation method and report generation device
CN111090974A (en) * 2019-12-27 2020-05-01 中国银行股份有限公司 Report generation method, device and equipment
CN111090974B (en) * 2019-12-27 2023-10-24 中国银行股份有限公司 Report generation method, device and equipment
CN111291544A (en) * 2020-01-13 2020-06-16 中国建设银行股份有限公司 Report generation method and device, electronic equipment and storage medium
CN111401023A (en) * 2020-03-13 2020-07-10 浙江中控技术股份有限公司 Report generation method and device, server and storage medium
CN111401023B (en) * 2020-03-13 2024-01-19 浙江中控技术股份有限公司 Report generation method, report generation device, server and storage medium
CN115146006A (en) * 2022-08-22 2022-10-04 东方合智数据科技(广东)有限责任公司 Report statistical method and related equipment for corrugated paper packaging industry

Similar Documents

Publication Publication Date Title
CN109582937A (en) Report form generation method, device, storage medium and processor
CN109582936A (en) The method and apparatus for configuring report messages
CN106067080B (en) Configurable workflow capabilities are provided
JP5295464B1 (en) System construction support tool and system
CN110058856A (en) Page configuration method and device
CN110399420A (en) A kind of deriving method, electronic equipment and the medium of configurableization Excel format
CN105740368A (en) Method and device for generating report form
CN107844518B (en) Method for evaluating download quantity of specified APP, data server, packaging platform and system
CN109145034B (en) Resource presentation method and device and computer terminal
CN104572813A (en) Report generation method and device
CN107943600A (en) A kind of method and apparatus of tradomation processing
CN110728123A (en) Report generation method, system and related equipment
CN107733710A (en) Construction method, device, computer equipment and the storage medium of link call relation
CN111800471B (en) Method and device for displaying recommended page and electronic equipment
CN110019261A (en) Data query method and apparatus
CN112579686A (en) Interaction method, interaction device, storage medium and electronic equipment
CN111382183A (en) Data query method and device
CN112559576A (en) Data display method, system, device, storage medium and electronic equipment
CN109426534A (en) A kind of reminding method and device of shortcut key
CN110209769A (en) Text filling method and device
CN111291543B (en) Data display method and device, storage medium and processor
CN106372081B (en) List identifier generation method, list shunt method and device
CN111984882A (en) Data processing method, system and equipment
CN106372121B (en) Server and data processing method
CN107766306B (en) Data display method and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100080 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

CB02 Change of applicant information