CN109582936B - Method and device for configuring report information - Google Patents

Method and device for configuring report information Download PDF

Info

Publication number
CN109582936B
CN109582936B CN201710894946.0A CN201710894946A CN109582936B CN 109582936 B CN109582936 B CN 109582936B CN 201710894946 A CN201710894946 A CN 201710894946A CN 109582936 B CN109582936 B CN 109582936B
Authority
CN
China
Prior art keywords
data
configuration
report
user
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710894946.0A
Other languages
Chinese (zh)
Other versions
CN109582936A (en
Inventor
李尚声
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201710894946.0A priority Critical patent/CN109582936B/en
Publication of CN109582936A publication Critical patent/CN109582936A/en
Application granted granted Critical
Publication of CN109582936B publication Critical patent/CN109582936B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a report generation method and a report generation device, wherein the method comprises the following steps: querying a data table contained in the database and a column contained in the data table; based on the queried table names of the data tables and column names of columns contained in the data tables, a report configuration interface is displayed; obtaining data extraction information for determining data required for generating a report according to at least one target data table selected by a user in the report configuration interface and at least one target column in the target data table and configuration operation of the user on the conditional configuration options; acquiring a data export position of the extracted data in the report template according to configuration operation of a user on position setting options in the report configuration interface; and storing the data extraction information and the data export position as report configuration information associated with the report template. The scheme can reduce the complexity of configuration operation required by report generation and reduce the complexity of report generation.

Description

Method and device for configuring report information
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for configuring report information.
Background
In the information management process, it is often necessary to present data in the form of reports. For example, in the working assessment process, the working performance of the staff and related data need to be displayed in a report form so as to facilitate statistical analysis and the like.
In the process of generating the report, basic report configuration operations, such as configuration of a storage address of data related to the report generation, data query conditions and the like, are needed, however, the process of configuring report information is complex, and only a technician who knows about related function programming can complete the configuration of the report, so that the configuration process of the report is complex, and the complexity of generating the report is high.
Disclosure of Invention
In view of the above, the present invention provides a method and apparatus for configuring report information that overcomes or at least partially solves the above-mentioned problems, so as to reduce the complexity of configuration operations required for generating a report, and reduce the complexity of generating a report.
In order to achieve the above object, the present application provides a method for configuring report information, including:
querying a data table contained in the database and a column contained in the data table;
based on the queried table names of the data tables and column names of columns contained in the data tables, a report configuration interface is displayed, wherein the report configuration interface is used for displaying the table names of the selectable data tables, the column names of the columns, various conditional configuration options for configuring data filtering conditions and position setting options for deriving the configuration data into a position range in a report;
Obtaining data extraction information for determining data required for generating a report according to at least one target data table selected by a user in the report configuration interface and at least one target column in the target data table and configuration operation of the user on the conditional configuration options;
acquiring a data export position of the extracted data in the report template according to configuration operation of a user on position setting options in the report configuration interface;
and storing the data extraction information and the data export position as report configuration information associated with the report template so as to generate a report in the report template based on the report configuration information.
Preferably, the report configuration interface includes: the system comprises a data source configuration window, a position configuration window and at least one condition configuration window, wherein the data source configuration window displays table names and column names of alternative data tables, the condition configuration window displays various condition configuration options, and the position configuration window comprises a plurality of position setting options.
Preferably, the obtaining the data extraction information for determining the data required for generating the report according to at least one target data table selected by the user in the report configuration interface and at least one target column in the target data table and the configuration operation of the user on the condition configuration options includes;
Acquiring at least one target data table selected by a user in the data source configuration window and at least one target column in the target data table;
determining a data filtering condition for filtering data in at least one target column in the target data table according to configuration operation of a user for at least one condition configuration option in at least one condition configuration window;
determining a table name of the at least one target data table and a column name of the at least one target column, and the data filtering condition as data extraction information;
the step of obtaining the data export position of the extracted data in the report template according to the configuration operation of the user on the position setting options in the report configuration interface comprises the following steps:
and determining a data export position configured by a user according to the configuration operation of the user on the position setting options in the position configuration window, wherein the data export position is used for determining data extracted from the at least one target data table and exporting the data to a position range in the report template.
Preferably, the condition configuration window includes at least: a temporal filter window comprising at least one temporal filter option and a filter condition window comprising at least one filter condition configuration option;
The determining, according to a configuration operation of a user in at least one condition configuration window for at least one condition configuration option, a data filtering condition for filtering data in at least one target column in the target data table includes:
determining a generation time range which is required to be met by a target data table for generating a report according to time selection operation of a user for the time screening options in the time filtering window;
and determining query conditions for data in at least one target column in the target data table according to configuration operation of a user for filtering condition configuration options in the filtering condition window.
Preferably, the method further comprises:
when the fact that the current moment meets the report generation condition is detected, report configuration information associated with a report template is obtained;
extracting information from the data in the report configuration information, and extracting target data required by generating a report from a database;
and exporting the target data to the report template according to the data export position to obtain a report to be generated.
On the other hand, the application also provides a device for configuring report information, which comprises:
a database query unit for querying a data table contained in the database and a column contained in the data table;
The interface display unit is used for displaying a report configuration interface based on the inquired table name of the data table and the column name of the column contained in the data table, wherein the report configuration interface is used for displaying the table name of the selectable data table, the column name of the column, various conditional configuration options for configuring data filtering conditions and position setting options for configuring a position range of data to be led out into a report;
the first configuration unit is used for obtaining data extraction information for determining data required for generating a report according to at least one target data table selected by a user in the report configuration interface and at least one target column in the target data table and configuration operation of the user on the condition configuration options;
the second configuration unit is used for acquiring a data export position of the extracted data in the report template according to configuration operation of a user on position setting options in the report configuration interface;
and the information storage unit is used for storing the data extraction information and the data export position as report configuration information associated with the report template so as to generate a report in the report template based on the report configuration information.
Preferably, the report configuration interface displayed by the interface display unit includes: the system comprises a data source configuration window, a position configuration window and at least one condition configuration window, wherein the data source configuration window displays table names and column names of alternative data tables, the condition configuration window displays various condition configuration options, and the position configuration window comprises a plurality of position setting options.
Preferably, the first configuration unit includes;
a data selection subunit, configured to obtain at least one target data table selected by a user in the data source configuration window and at least one target column in the target data table;
a condition determining subunit, configured to determine, according to a configuration operation of a user in at least one condition configuration window for at least one condition configuration option, a data filtering condition for filtering data in at least one target column in the target data table;
a first configuration subunit configured to determine a table name of the at least one target data table and a column name of the at least one target column, and the data filtering condition as data extraction information;
The second configuration unit includes:
and the second configuration subunit is used for determining a data export position configured by the user according to the configuration operation of the user on the position setting options in the position configuration window, wherein the data export position is used for determining the data extracted from the at least one target data table and exporting the data to the position range in the report template.
In another aspect, the present application further provides a storage medium, where a program is stored, where the program when executed by a processor implements a method for configuring report information according to any one of the above.
In another aspect, the present application further provides a processor, where the processor is configured to run a program, and the program executes the method for configuring report information according to any one of the above methods.
By means of the technical scheme, if the report configuration information required by the report generation is required to be configured, the embodiment of the application can query the data table and the column contained in the database and display the report configuration interface, and as the table names of the data table and the column names of the column contained in the data table which can be selected are displayed in the report configuration interface, a user can directly select the target data table and the target column where the data for generating the report are located in the report configuration interface, so that the user can conveniently configure the data source for generating the report. Meanwhile, the report configuration interface displays a plurality of condition configuration options for configuring data filtering conditions and position setting options for guiding out the configuration data to a position range in the report, so that a user can directly perform relevant selection operation on the condition configuration options and the position setting options, and the conditions required to be met by the data for generating the report and the guiding-out positions required to be guided out by the data in the report can be determined, complicated programming operation of the user is not needed, the configuration of the report can be completed, and the complexity of configuring report information is reduced.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flow diagram of one embodiment of a method of configuring report information of the present application;
FIG. 2 is a flow chart of another embodiment of a method of configuring report information of the present application;
FIG. 3a illustrates a schematic diagram of a data source configuration window in a report configuration interface;
FIG. 3b is a schematic diagram of a conditional configuration window for configuring a timeframe in a report configuration interface;
FIG. 3c is a schematic diagram of a position configuration window for setting a data export position in a report configuration interface;
FIG. 4 is a flow chart of a method of generating a report implemented based on the method of configuring report information of the present application;
fig. 5 is a schematic diagram showing the composition and structure of an embodiment of an apparatus for configuring report information in the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The solution of the present application relates to a process of configuring configuration information required for generating a report before generating the report.
For example, referring to fig. 1, a flowchart of an embodiment of a method for configuring report information in the present application is shown, where the embodiment of the present application may be applied to any computer device with a data processing function, and the computer device may generate a report based on a preconfigured report template. The method of the embodiment can comprise the following steps:
S101, inquiring a data table contained in a database and a column contained in the data table.
It will be appreciated that the report is dynamically displayed in a form such as a table, chart, etc. and that to generate the report it is necessary to determine the source of the data, i.e. which data in the database is used to generate the report, and therefore it is necessary to determine which data tables are included in the database and which columns are present in the data tables by querying the database in order to subsequently select the required data from the data tables and columns. Wherein a column in a data table may also be referred to as a field.
The scheme of the embodiment of the application is suitable for the situation of generating the report based on the report template, and in the situation, the configuration information for configuring the report information is the configuration information required for generating the report for the report template configuration.
If the configuration report information condition is satisfied, this step S101 is executed. In one implementation, after the report template is displayed, a database query request may be triggered by a user, and information such as a database table and fields included in each database table included in the database may be queried in response to the database query request. If the user clicks a designated key in the computer device or presses an icon or key preset in the report template, the computer device generates a database query request and sends the database query request to the database to query information such as a data table contained in the database, fields contained in the data table, names of records and the like.
The specific implementation manner of querying the data table and the field information of the database from the database may be various, for example, a plug-in capable of establishing connection with the database may be preset, and when the database needs to be queried, the plug-in is called, and connection is established with the database through the plug-in, so that the information such as the data table contained in the database is queried.
S102, based on the queried table names of the data tables and column names of columns contained in the data tables, a report configuration interface is displayed.
The report configuration interface is an interface for configuring configuration information required for generating a report.
In order to reduce the complexity of configuring report information, the report configuration interface is not a program programming interface, and is used for displaying table names and column names of selectable data tables, and also displaying various conditional configuration options for configuring data filtering conditions and position setting options for deriving configuration data into a position range in a report.
It can be understood that, because the table names of the data tables contained in the database and the column names of the columns contained in the data tables are displayed in the report configuration interface, the user can select the data table for generating the report and the column in which the data for generating the report is located from the report configuration interface according to the data source required for generating the report, and therefore, the user can complete the selection operation of the data source only by simple selection.
The data source is used for generating the report, and the data source is used for storing the data which is required to be screened out. In practical applications, the data filtering conditions may include various conditions, such as conditions that need to be met by the generation time of the data table in the database; the query condition that the field in the data source needs to satisfy, for example, taking the field as the working age as an example, the query condition may be that the working age is greater than 10 years, etc. Of course, the data filtering conditions may also have other possibilities, and are not limited herein.
Correspondingly, various condition configuration options in the report configuration interface can be used for realizing the option of configuring different kinds of data filtering conditions, and a user can finish the selection or configuration of the filtering conditions by clicking to select the condition configuration option or selecting a corresponding configuration item from a drop-down list of the condition configuration option, so that the user can select the condition configuration option or a selectable item in the condition configuration option according to the requirement even if the user does not know the related configuration function.
For example, each condition configuration option may be a selectable option, taking as an example a generation time that needs to be satisfied for configuring data for generating a report, the condition configuration option may be an option for generating a time, for example, yesterday, today, tomorrow, etc., and if it is desired to acquire data in a data table of a day before the current date to generate a report, the time of yesterday option may be selected.
For another example, the condition configuration options may include a plurality of selectable objects, different objects represent different data filtering requirements, and still take the generation time required to be met by configuring the data for generating the report as an example for explanation, if the generation time of the data table for generating the report needs to be limited to be a certain time period, the report configuration interface may include a condition configuration option for setting the start time and a condition configuration option for setting the end time, different dates may be displayed in the two condition configuration options for selection by the user, and the user may select corresponding dates in the condition configuration options for the start time and the end time according to the requirement, where the data table generated between the two dates is the data table required to be used for generating the report.
Accordingly, the position setting options and the conditional configuration option types can be used for setting positions of data to be exported to the report template, and the user can set positions of the data to be exported to the report template by selecting the position setting options or selecting corresponding boundary positions in the position setting options. For example, the location setting options may include: whether the title bar is included, a choice for setting the form in which the derived position is located, and so on.
It can be appreciated that, in the embodiment of the present application, the report configuration interface may simultaneously present the table names of the above selectable data tables, the column names of the columns included in the data tables, the condition configuration options, and the position setting options. In order to distinguish the functions of different setting options, so that a user can set configuration information more intuitively and conveniently, the report configuration interface can also comprise a plurality of window interfaces for realizing different configuration functions, and options or contents displayed by each window interface are different.
For example, the report configuration interface may include: a data source configuration window, a location configuration window, and at least one condition configuration window, wherein the data source configuration window displays table names and column names of alternative data tables; the conditional configuration window presents a plurality of conditional configuration options; the location configuration window includes a plurality of location setting options. The report configuration interface can display window names corresponding to different configuration windows, and the report configuration interface is used for clicking the window name of a certain configuration window to display the corresponding configuration window. For example, for clicking on the name of the data source configuration window, the data source configuration window may be presented in the report configuration interface, such that the user may select a desired data table and column from among the names of the data tables and columns displayed in the data source configuration window.
S103, obtaining data extraction information for determining data required for generating a report according to at least one target data table selected by a user in the report configuration interface and at least one target column in the target data table and configuration operation of the user on the condition configuration options.
For convenience of distinction, a data table selected by a user from the report configuration interface is referred to as a target data table, and a column selected by the user is referred to as a target column.
The data extraction information is the basis for extracting the data needed by generating the report form from the database, and according to the data extraction information, the data which need to be extracted from the database can be determined to generate the report form.
It will be appreciated that the data extraction information includes: generating at least one target data table required by the report and information of at least one target column of the data table for generating the report, and further comprising: and filtering data in the target column in the at least one target data table.
S104, acquiring a data export position of the extracted data in the report template according to the configuration operation of the user on the position setting options in the report configuration interface.
The data export position is determined according to the configuration operation of the user for the position setting options in the report configuration interface, for example, according to whether the position setting options are in a selected state or not, the selected region range in the position setting options and other information, the region which belongs to the user and is set in the report template and used for exporting data is analyzed, and therefore the region is used as the data export position.
For example, the data export locations may be the areas of row 2, column 2 through row 10, column 12 in the reporting template.
The report template is a template for generating a report, and the report template can be preset with information such as a graph style, a formula and the like required by the report.
S105, storing the data extraction information and the data export position as report configuration information associated with the report template so as to generate a report in the report template based on the report configuration information.
After the data extraction information and the data export position are used as report configuration information to be stored in association with the report template, if the report configuration information is needed to be generated by using the report template, the report configuration information does not need to be repeatedly configured, so that the data for generating a report can be directly queried from a database based on the report configuration information, and the data is exported to a corresponding area in the report template, and report generation is completed.
It can be seen that, in this embodiment of the present application, if the report configuration information required for generating the report needs to be configured, the data table and the column included in the database may be queried, and the report configuration interface is displayed. Meanwhile, the report configuration interface displays a plurality of condition configuration options for configuring data filtering conditions and position setting options for guiding out the configuration data to a position range in the report, so that a user can directly perform relevant selection operation on the condition configuration options and the position setting options, and the conditions required to be met by the data for generating the report and the guiding-out positions required to be guided out by the data in the report can be determined, complicated programming operation of the user is not needed, the configuration of the report can be completed, and the complexity of configuring report information is reduced.
For ease of understanding the solution of the present application, a report configuration interface will be described by taking as an example a report configuration interface including a data source configuration window, a location configuration window, and at least one condition configuration window.
For example, referring to fig. 2, which is a schematic flow chart illustrating another embodiment of a method for configuring report information in the present application, the method in this embodiment may include:
s201, when a report information configuration request is detected, inquiring the table names of data tables contained in a database and the column names of various columns contained in the data tables by calling a preset plug-in.
If the user clicks the designated key, the computer equipment is triggered to generate a report information configuration request.
It will be appreciated that other ways of triggering a query to a database are equally applicable to the present embodiment. Accordingly, the query of the database by calling the preset plugin is only one implementation, and other implementations are also applicable to the present embodiment.
S202, displaying a report configuration interface based on the inquired table name of at least one data table and the column name of the column contained in each data table, and displaying a data source configuration window in the report configuration interface.
Wherein the data source configuration window displays table names and column names of columns of the alternative data table.
For example, the data source configuration window may respectively present table names of respective data tables and column names of respective columns in the form of options, and if a user wishes to select which column name, the corresponding option may be clicked.
For another example, a data table drop-down list and a column drop-down list may be displayed in the data source configuration window, so that table names of respective data tables and column names of respective columns are displayed in the form of the drop-down list, and a user may select a desired data table in the drop-down list of the data table and select a column name of a target column in the column drop-down list.
For ease of understanding, reference may be made to FIG. 3a, which illustrates a schematic diagram of a report configuration interface and a data source configuration window in the report configuration interface in this application, and from FIG. 3a, it may be appreciated that the report configuration interface 301 may include a plurality of different configuration windows, such as the data source configuration window 302, which is illustrated in FIG. 3a, and has a window name "data sheet" in the report configuration interface. A data table name display field is displayed in the data source configuration window 302, in which the name of the target data table selected by the user may be displayed, such as "test" in fig. 3 a; the data source configuration window 302 may also present a column name display column (not shown in FIG. 3 a).
S203, at least one target data table selected by a user in the data source configuration window and at least one target column in the target data table are obtained.
S204, when the condition configuration window name in the report configuration interface is detected to be clicked by the user, the condition configuration window is displayed in the report configuration interface.
Wherein the condition configuration window includes at least one condition configuration option.
Of course, the user clicking on the name of the condition configuration window to trigger the condition configuration interface to be displayed in the report configuration interface is only one implementation manner, and other manners of triggering the condition configuration interface to be displayed are also applicable to the embodiment.
It can be appreciated that the data filtering conditions can be various, and correspondingly, the condition configuration window in the report configuration interface can be various.
For example, the report configuration interface may include at least: a time filter window and a filter condition window. The time filtering window is used for configuring a generating time range which is required to be met by a target data table for generating a report, the conditional configuration options of the time filtering window can be time screening options, and the time screening options can be used for setting generating time which is required to be met by the report.
Wherein the filter term window is used to configure query terms for data in at least one target column in the target data table. Correspondingly, the condition configuration options in the filtering condition window may be filtering condition configuration options, for example, the filtering condition configuration options may include "and", ">", "=" and so on, and the user may select the filtering condition configuration options according to the actual configuration requirement, and establish a functional relationship between the fields and the filtering condition configuration options. If the user needs to set the value of the field as the set value, the field name of the field can be input or selected in the filtering condition window, then the filtering condition configuration option is configured to be equal to the set value, and the set value is input, so that the setting of the data filtering condition can be completed.
S205, determining a data filtering condition for filtering data in at least one target column in the target data table according to the configuration operation of the user for at least one condition configuration option in at least one condition configuration window.
For example, configuring the window with the condition includes at least: for example, the time filtering window and the filtering condition window may determine a generating time range required to be satisfied by the target data table for generating the report according to a time selection operation of the user for the time filtering option in the time filtering window; accordingly, according to the configuration operation of the user for the filtering condition configuration options in the filtering condition window, the query condition for the data in at least one target column in the data table is determined.
For ease of understanding, a time filter window is illustrated as an example, where window 303 is named "time" in report configuration interface 301, as shown in FIG. 3 b. In the time filtering window, there are various time filtering options, such as "yesterday", "previous day", "present month", and "user-defined", and if the user only needs to determine that the data for generating the report is a time corresponding to the current date, the user may click on the preset time filtering option as required, such as "yesterday", "present month", etc., where the generating time range required to be satisfied by the data table may be the previous day of the current date or the month where the current date is located. If the user wishes to randomly define a time range, the user may click on the "custom" option and then select the desired time range in the custom associated time configuration field, e.g., from 2017, 7, 1, to 2017, 7, 15.
The configuration of the filtering condition window is similar to that of the time filtering window, and various fixedly set configuration options and various custom configuration options can be provided for the user to configure the required data filtering conditions, which is not limited herein.
S206, determining the table name of the at least one target data table and the column name of the at least one target column, and the data filtering condition as data extraction information.
S207, when the user is detected to click on the name of the position configuration window in the report configuration interface, the position configuration window is displayed in the report configuration interface.
Wherein the location configuration window includes a plurality of location setting options. The position range can be set by the position setting option.
For example, as a schematic diagram of a location configuration window is shown with reference to fig. 3c, the name of the location configuration window 304 in the report configuration interface 301 is "export options" in fig. 3 c. Included in the location configuration window 304 are a number of location configuration options, such as "exported workbook" may select into which workbook data needs to be exported. For another example, "whether the title line is included" and "whether the summary line is included" can characterize whether the title line or the summary line is included in the target data needed to generate the report, so that the system can adjust the area of the derived position configured by the user by whether the information of the title line and the summary line is included in the target data. For example, if the target data to be exported by the user configuration includes a header line, it is necessary to move down the original export position of the worksheet so that the header line of the target data is exported by Fang Yuliu lines in the original export position, and change the export position from the cell region of 4*4 constituted by the first 4 lines and the first 4 columns to the cell region of 5*4 constituted by the first 5 columns and the first 4 columns, assuming that the export position is a cell region of 4*4 constituted by the first 4 lines and the first 4 columns in the worksheet according to the configuration of other position configuration options by the user. The "export method" may also set from which position point of the workbook data is exported. It can be seen that by means of these various location configuration options it can be determined into which workbook and into which part of the area of the workbook the data needs to be exported.
S208, determining the data export position configured by the user according to the configuration operation of the user on the position setting options in the position configuration window.
The data export location is used for determining data extracted from at least one target data table and exporting the data to a location range in the report template.
Fig. 4 is a schematic flow chart of report generation in a method for configuring report information according to the present application, where the method of the present embodiment may include:
s401, detecting whether the current moment meets the report generation condition.
Wherein, the report generation condition can be set according to the requirement. For example, a plurality of different report generation times may be set; for another example, a report generation period may be set, and the report generation time may be determined according to the report generation period, so as to periodically take out data required for generating the report from the database, and complete report generation.
S402, when the report generation condition is detected to be met, acquiring report configuration information configured for a report template in advance.
In the embodiment of the application, the report configuration information configured for the report template is some configuration information required for generating a report based on the report template, and after the report configuration information is preconfigured and stored, the report configuration information required for generating the report does not need to be repeatedly configured each time.
For example, the report configuration information at least includes: data extraction information and data derivation locations.
The data extraction information is used for determining conditions which are required to be met for extracting target data for generating a report form from a database. For example, the data extraction information may include: the target column name of the target column used for generating the report in the data source, and the data screening condition for screening the data in the target column pointed by the target column name.
In the embodiment of the present application, for convenience of distinction, a column to which data required for generating a report belongs is referred to as a target column, and a name of the target column is referred to as a target column name. The data required for generating the report is referred to as target data.
Correspondingly, the data filtering condition is a condition for filtering the data table in the database and the data in the target column in the data table. For example, the data filtering condition may include one or more of a condition that needs to be satisfied by a data table in which the target data is located, a filtering condition that needs to be satisfied by a target column in which the target data is located, and the like. The condition to be met by the data table may be that the generation time of the data table belongs to a specified time range corresponding to the current time, for example, if the current time is the report generation time, the data table where the target data is located needs to be data generated within one week before the current time, where the generation time of the data table is the generation time of the data table in the database. The filtering condition to be met by the target column where the target data is located may be that the value of each field in the target column meets a preset condition. For example, taking the column name as the work age as an example, the filtering condition may be data of staff having a work age of more than 10 years.
The data export location information is used for determining the location of the export of the target data into the report. Such as which portion of the cell area of which worksheet of the report the data needs to be stored.
The process of configuring the data extraction information and the data deriving position information may be specifically referred to the related description of the foregoing embodiments, and will not be described herein.
S403, extracting target data required by generating a report form from a database according to the data extraction information.
For example, the data extraction information includes: when the table name of at least one target data table, the column name of at least one target column and the data screening condition for screening the data in at least one target column in at least one target data table are adopted, at least one target column corresponding to the at least one target column name is determined from the target data table in the database; then, based on the data screening condition, target data satisfying the condition is screened from the data contained in the at least one target column.
Of course, when the data filtering condition further includes a condition (e.g., a generation time of the data table or a condition that the name needs to satisfy) that the data table needs to satisfy, then the target data table satisfying the condition is determined first, and then the target data satisfying the condition is screened from the data included in the at least one target column in the target data table.
In one possible implementation, a query statement for extracting target data required for generating a report may be generated based on the data filtering conditions required to be satisfied by the data table, the target column, and the data in the target column included in the data extraction information, for example, the query statement may be an SQL statement; the query statement may then be sent to the database such that the database queries, by executing the query statement, the target data needed to generate the report and returns the target data.
S404, exporting the target data to the report template according to the data export position to obtain a report to be generated.
The report template is provided with a relevant mode required by the report, such as a report style, a required formula and the like, so that the required report can be obtained after the extracted target data is exported to the report template according to the data export position.
On the other hand, the embodiment of the application also provides a device for configuring report information. For example, referring to fig. 5, which is a schematic diagram illustrating a composition structure of an embodiment of an apparatus for configuring report information in the present application, the apparatus in this embodiment may include:
A database query unit 501, configured to query a data table included in a database and a column included in the data table;
an interface presenting unit 502, configured to present a report configuration interface based on the table name of the queried data table and the column name of the column included in the data table, where the report configuration interface is configured to present the table name of the selectable data table, the column name of the column, a plurality of conditional configuration options for configuring data filtering conditions, and a position setting option for configuring a position range where data is derived into a report;
a first configuration unit 503, configured to obtain data extraction information for determining data required for generating a report according to at least one target data table selected by a user in the report configuration interface and at least one target column in the target data table, and a configuration operation of the user for the condition configuration option;
a second configuration unit 504, configured to obtain a data export position for determining the extracted data in the report template according to a configuration operation of a user on a position setting option in the report configuration interface;
and an information storage unit 505, configured to store the data extraction information and the data export location as report configuration information associated with the report template, so as to generate a report in the report template based on the report configuration information.
In one implementation, the report configuration interface displayed by the interface display unit includes: the system comprises a data source configuration window, a position configuration window and at least one condition configuration window, wherein the data source configuration window displays table names and column names of alternative data tables, the condition configuration window displays various condition configuration options, and the position configuration window comprises a plurality of position setting options.
Optionally, the first configuration unit includes;
a data selection subunit, configured to obtain at least one target data table selected by a user in the data source configuration window and at least one target column in the target data table;
a condition determining subunit, configured to determine, according to a configuration operation of a user in at least one condition configuration window for at least one condition configuration option, a data filtering condition for filtering data in at least one target column in the target data table;
a first configuration subunit configured to determine a table name of the at least one target data table and a column name of the at least one target column, and the data filtering condition as data extraction information;
The second configuration unit includes:
and the second configuration subunit is used for determining a data export position configured by the user according to the configuration operation of the user on the position setting options in the position configuration window, wherein the data export position is used for determining the data extracted from the at least one target data table and exporting the data to the position range in the report template.
Further, at least one condition configuration window in the report configuration unit displayed by the interface display unit at least comprises: a temporal filter window comprising at least one temporal filter option and a filter condition window comprising at least one filter condition configuration option;
the condition determining subunit includes:
the time determining subunit is used for determining a generating time range which is required to be met by a target data table for generating a report according to the time selection operation of a user for the time screening options in the time filtering window;
and the query condition determining subunit is used for determining the query condition for the data in at least one target column in the target data table according to the configuration operation of the user for the filtering condition configuration options in the filtering condition window.
In one implementation, the apparatus may further include:
the information acquisition unit is used for acquiring report configuration information associated with the report template when the current moment is detected to meet the report generation condition;
the data extraction unit is used for extracting the target data required by generating the report form from the database according to the data extraction information in the report configuration information;
and the report generating unit is used for exporting the target data to the report template according to the data export position to obtain a report to be generated.
The device for configuring report information comprises a processor and a memory, wherein the database query unit, the interface display unit, the first configuration unit, the second configuration unit, the information storage unit and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can be provided with one or more than one kernel, and the complexity of configuration operation required by report generation is reduced by adjusting kernel parameters, so that the complexity of report generation is reduced.
The memory may include volatile memory, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flashRAM), among other forms in computer readable media, the memory including at least one memory chip.
The embodiment of the invention provides a storage medium, and a program is stored on the storage medium, and the program is executed by a processor to realize the method for configuring report information.
The embodiment of the invention provides a processor which is used for running a program, wherein the method for configuring report information is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program stored in the memory and capable of running on the processor, wherein the processor realizes the following steps when executing the program:
querying a data table contained in the database and a column contained in the data table;
based on the queried table names of the data tables and column names of columns contained in the data tables, a report configuration interface is displayed, wherein the report configuration interface is used for displaying the table names of the selectable data tables, the column names of the columns, various conditional configuration options for configuring data filtering conditions and position setting options for deriving the configuration data into a position range in a report;
obtaining data extraction information for determining data required for generating a report according to at least one target data table selected by a user in the report configuration interface and at least one target column in the target data table and configuration operation of the user on the conditional configuration options;
Acquiring a data export position of the extracted data in the report template according to configuration operation of a user on position setting options in the report configuration interface;
and storing the data extraction information and the data export position as report configuration information associated with the report template so as to generate a report in the report template based on the report configuration information.
The device herein may be a server, PC, PAD, cell phone, etc.
The present application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of:
querying a data table contained in the database and a column contained in the data table;
based on the queried table names of the data tables and column names of columns contained in the data tables, a report configuration interface is displayed, wherein the report configuration interface is used for displaying the table names of the selectable data tables, the column names of the columns, various conditional configuration options for configuring data filtering conditions and position setting options for deriving the configuration data into a position range in a report;
obtaining data extraction information for determining data required for generating a report according to at least one target data table selected by a user in the report configuration interface and at least one target column in the target data table and configuration operation of the user on the conditional configuration options;
Acquiring a data export position of the extracted data in the report template according to configuration operation of a user on position setting options in the report configuration interface;
and storing the data extraction information and the data export position as report configuration information associated with the report template so as to generate a report in the report template based on the report configuration information.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A method for configuring report information, comprising:
querying a data table contained in the database and a column contained in the data table;
based on the queried table names of the data tables and column names of columns contained in the data tables, a report configuration interface is displayed, wherein the report configuration interface is used for displaying the table names of the data tables, column names of the columns, various condition configuration options for configuring data filtering conditions and position setting options for guiding out the configuration data to a position range in a report, so that a user can directly select a target data table and a target column where the data for generating the report are located in the report configuration interface, and the user can directly perform related selection operation on the condition configuration options and the position setting options without complex programming operation of the user;
Obtaining data extraction information for determining data required for generating a report according to at least one target data table selected by a user in the report configuration interface and at least one target column in the target data table and configuration operation of the user on the conditional configuration options;
acquiring a data export position of the extracted data in the report template according to configuration operation of a user on position setting options in the report configuration interface;
and storing the data extraction information and the data export position as report configuration information associated with the report template so as to generate a report in the report template based on the report configuration information.
2. The method of claim 1, wherein the report configuration interface comprises: the system comprises a data source configuration window, a position configuration window and at least one condition configuration window, wherein the data source configuration window displays table names and column names of alternative data tables, the condition configuration window displays various condition configuration options, and the position configuration window comprises a plurality of position setting options.
3. The method for configuring report information according to claim 2, wherein the obtaining data extraction information for determining data required for generating a report according to at least one target data table selected by a user in the report configuration interface and at least one target column in the target data table and a configuration operation of the user for the conditional configuration option includes;
Acquiring at least one target data table selected by a user in the data source configuration window and at least one target column in the target data table;
determining a data filtering condition for filtering data in at least one target column in the target data table according to configuration operation of a user for at least one condition configuration option in at least one condition configuration window;
determining a table name of the at least one target data table and a column name of the at least one target column, and the data filtering condition as data extraction information;
the step of obtaining the data export position of the extracted data in the report template according to the configuration operation of the user on the position setting options in the report configuration interface comprises the following steps:
and determining a data export position configured by a user according to the configuration operation of the user on the position setting options in the position configuration window, wherein the data export position is used for determining data extracted from the at least one target data table and exporting the data to a position range in the report template.
4. A method of configuring report information as claimed in claim 3 wherein said conditional configuration window comprises at least: a temporal filter window comprising at least one temporal filter option and a filter condition window comprising at least one filter condition configuration option;
The determining, according to a configuration operation of a user in at least one condition configuration window for at least one condition configuration option, a data filtering condition for filtering data in at least one target column in the target data table includes:
determining a generation time range which is required to be met by a target data table for generating a report according to time selection operation of a user for the time screening options in the time filtering window;
and determining query conditions for data in at least one target column in the target data table according to configuration operation of a user for filtering condition configuration options in the filtering condition window.
5. The method of configuring report information of any one of claims 1 to 4, further comprising:
when the fact that the current moment meets the report generation condition is detected, report configuration information associated with a report template is obtained;
extracting information from the data in the report configuration information, and extracting target data required by generating a report from a database;
and exporting the target data to the report template according to the data export position to obtain a report to be generated.
6. An apparatus for configuring report information, comprising:
A database query unit for querying a data table contained in the database and a column contained in the data table;
the interface display unit is used for displaying a report configuration interface based on the inquired table name of the data table and the column name of the column contained in the data table, wherein the report configuration interface is used for displaying the table name of the selectable data table, the column name of the column, various conditional configuration options for configuring data filtering conditions and position setting options for guiding the configuration data to a position range in a report, so that a user can directly select a target data table and a target column where the data for generating the report are located in the report configuration interface, and the user can directly perform related selection operation on the conditional configuration options and the position setting options without complex programming operation of the user;
the first configuration unit is used for obtaining data extraction information for determining data required for generating a report according to at least one target data table selected by a user in the report configuration interface and at least one target column in the target data table and configuration operation of the user on the condition configuration options;
the second configuration unit is used for acquiring a data export position of the extracted data in the report template according to configuration operation of a user on position setting options in the report configuration interface;
And the information storage unit is used for storing the data extraction information and the data export position as report configuration information associated with the report template so as to generate a report in the report template based on the report configuration information.
7. The apparatus for configuring report information according to claim 6, wherein the report configuration interface presented by the interface presenting unit comprises: the system comprises a data source configuration window, a position configuration window and at least one condition configuration window, wherein the data source configuration window displays table names and column names of alternative data tables, the condition configuration window displays various condition configuration options, and the position configuration window comprises a plurality of position setting options.
8. The apparatus for configuring report information as described in claim 7, wherein said first configuration unit comprises;
a data selection subunit, configured to obtain at least one target data table selected by a user in the data source configuration window and at least one target column in the target data table;
a condition determining subunit, configured to determine, according to a configuration operation of a user in at least one condition configuration window for at least one condition configuration option, a data filtering condition for filtering data in at least one target column in the target data table;
A first configuration subunit configured to determine a table name of the at least one target data table and a column name of the at least one target column, and the data filtering condition as data extraction information;
the second configuration unit includes:
and the second configuration subunit is used for determining a data export position configured by the user according to the configuration operation of the user on the position setting options in the position configuration window, wherein the data export position is used for determining the data extracted from the at least one target data table and exporting the data to the position range in the report template.
9. A storage medium having stored therein a program which when executed by a processor implements a method of configuring report information as claimed in any one of claims 1 to 5.
10. A processor for running a program, wherein the program is run-time to perform the method of configuring report information according to any one of claims 1-5.
CN201710894946.0A 2017-09-28 2017-09-28 Method and device for configuring report information Active CN109582936B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710894946.0A CN109582936B (en) 2017-09-28 2017-09-28 Method and device for configuring report information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710894946.0A CN109582936B (en) 2017-09-28 2017-09-28 Method and device for configuring report information

Publications (2)

Publication Number Publication Date
CN109582936A CN109582936A (en) 2019-04-05
CN109582936B true CN109582936B (en) 2023-07-07

Family

ID=65913040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710894946.0A Active CN109582936B (en) 2017-09-28 2017-09-28 Method and device for configuring report information

Country Status (1)

Country Link
CN (1) CN109582936B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110728126A (en) * 2019-10-24 2020-01-24 北京新氧万维科技咨询有限公司 Report generation method, device and equipment
CN111144083B (en) * 2019-12-20 2023-11-03 腾讯科技(深圳)有限公司 Report generation method, device, equipment and computer readable storage medium
CN111291544A (en) * 2020-01-13 2020-06-16 中国建设银行股份有限公司 Report generation method and device, electronic equipment and storage medium
CN110852050A (en) * 2020-01-16 2020-02-28 杭州健戎潜渊科技有限公司 Method and device for configuring report generation system and electronic equipment
CN111949662A (en) * 2020-08-13 2020-11-17 北京字节跳动网络技术有限公司 Data display method and device, storage medium and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9400777B2 (en) * 2012-11-02 2016-07-26 CRM Excel Template, LLC Management data processing system and method
CN104699681A (en) * 2013-12-04 2015-06-10 航天信息股份有限公司 Data processing method based on metadata base
CN104036040B (en) * 2014-06-30 2017-11-03 北京猎豹移动科技有限公司 Report form generation method and device
CN105718495A (en) * 2015-08-21 2016-06-29 哈尔滨安天科技股份有限公司 Exporting method and system of database hierarchical HTML (Hypertext Markup Language) statement

Also Published As

Publication number Publication date
CN109582936A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
CN109582936B (en) Method and device for configuring report information
CN110297759B (en) Method, device, equipment and storage medium for manufacturing test page script
US20170161341A1 (en) Systems and methods for modelling virtual schemas in non-relational databases
CN109582937A (en) Report form generation method, device, storage medium and processor
CN110413634B (en) Data query method, system, device and computer readable storage medium
CN109002334B (en) Operation and maintenance platform and data processing method thereof
CN106610774B (en) Webpage table editing method and device
CN110019261B (en) Data query method and device
CN112433712A (en) Report display method and device, computer equipment and storage medium
US20180060890A1 (en) Standardized custom surveys
CN110909010B (en) Data intelligent analysis configuration management method, device, equipment and storage medium
CN110750443A (en) Webpage testing method and device, computer equipment and storage medium
US10565224B2 (en) Data provision apparatus and data provision method
CN111382183B (en) Data query method and device
CN112579686A (en) Interaction method, interaction device, storage medium and electronic equipment
CN101751436A (en) Method and system for generating reports
CN106649320B (en) rectangular tree graph processing 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
CN105740131B (en) Software user behavior rollback processing method and device
CN110941608B (en) Method, device and equipment for generating buried point analysis and funnel analysis report
CN108810299B (en) Information analysis method, medium and equipment
CN110019198B (en) Data query method and device
WO2021028891A1 (en) Scalable interactive data collection system
CN117130946B (en) Test scene generation method and device, electronic equipment and readable storage medium

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 GRIDSUM TECHNOLOGY Co.,Ltd.

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

Applicant before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant