CN107491427A - Data sheet processing method and processing device - Google Patents
Data sheet processing method and processing device Download PDFInfo
- Publication number
- CN107491427A CN107491427A CN201710428838.4A CN201710428838A CN107491427A CN 107491427 A CN107491427 A CN 107491427A CN 201710428838 A CN201710428838 A CN 201710428838A CN 107491427 A CN107491427 A CN 107491427A
- Authority
- CN
- China
- Prior art keywords
- report
- component
- layout
- target
- target report
- 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
Links
- 238000012545 processing Methods 0.000 title claims abstract description 28
- 238000003672 processing method Methods 0.000 title abstract description 11
- 238000000034 method Methods 0.000 claims abstract description 93
- 230000004044 response Effects 0.000 claims abstract description 25
- 238000003860 storage Methods 0.000 claims description 42
- 238000013507 mapping Methods 0.000 claims description 37
- 238000009877 rendering Methods 0.000 claims description 32
- 230000008569 process Effects 0.000 description 33
- 238000010586 diagram Methods 0.000 description 23
- 230000015654 memory Effects 0.000 description 19
- 238000004590 computer program Methods 0.000 description 13
- 230000000694 effects Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 230000008859 change Effects 0.000 description 6
- 230000000712 assembly Effects 0.000 description 5
- 238000000429 assembly Methods 0.000 description 5
- 238000012800 visualization Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000006399 behavior Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 239000003086 colorant Substances 0.000 description 2
- 238000012217 deletion Methods 0.000 description 2
- 230000037430 deletion Effects 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000017105 transposition Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/177—Editing, e.g. inserting or deleting of tables; using ruled lines
- G06F40/18—Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
- G06F16/9577—Optimising the visualization of content, e.g. distillation of HTML documents
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- User Interface Of Digital Computer (AREA)
- Document Processing Apparatus (AREA)
Abstract
The embodiment of the present application provides a kind of data sheet processing method and processing device.Method includes:Present graphical interface, graphic interface include the report component that can be dragged and layout panel, so that user lays target report component on layout panel;Operated in response to component Configuration of the user on graphic interface, obtain the related information of the layout information and target report component between target report component;According to the layout information between target report component and the related information of target report component, report description (RD) file is generated;Report description (RD) file is rendered, with output data form.The embodiment of the present application operation is relatively easy, more friendly, flexible in terms of report component is laid, and is advantageous to improve report generation efficiency.
Description
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for processing a data report.
Background
The data report has the advantages of intuition and easy understanding in the aspect of displaying data, so the data report is widely applied to various industries. The data report is a transmission carrier of data, and the data can be embodied in the data report through report components, such as tables, line graphs, sector graphs, bar graphs and the like. Generally, the arrangement form of the report components is different according to different application scenes. The arrangement form among the report components can be called the layout of the data report.
In the prior art, report configurator is required to write configuration files corresponding to data reports by using a programming Language, such as HyperText Markup Language (HTML), and the configuration files are mainly used for configuring data contents of data reports, associations between the data contents and report components, and layouts between the report components. And then, the configuration file is solidified in the machine, and finally, the machine generates a data report according to the configuration file.
In the existing data report generation process, report configuration personnel need to master certain programming skills to compile configuration files corresponding to the data report, and the configuration files need to be revised every time configuration information changes, so that the process of generating the data report is relatively complex, the mode of generating the data report is not friendly and flexible enough, and the report generation efficiency is relatively low.
Disclosure of Invention
The embodiment of the application provides a data report processing method and device, which are used for providing a friendly and flexible report generation mode for a user, simplifying the data report generation process and improving the data report generation efficiency.
The embodiment of the application provides a data report processing method, which comprises the following steps:
displaying a graphical interface, wherein the graphical interface comprises a report component and a layout panel which can be dragged, and a user can lay a target report component on the layout panel;
responding to the component configuration operation of the user on the graphical interface, and acquiring layout information among the target report components and associated information of the target report components;
generating a report description file according to the layout information among the target report components and the associated information of the target report components;
and rendering the report description file to output a data report.
In an optional embodiment, prior to the component configuration operation on the graphical interface in response to the user, the method further comprises:
and responding to the dragging operation of the user on the report component, and determining the report component dragged to the layout panel by the user as the target report component.
In an optional embodiment, in response to a component configuration operation of the user on the graphical interface, acquiring layout information between the target report components and association information of the target report components includes:
responding to the component editing operation of the user, and editing the associated information of the target report component;
responding to the layout adjustment operation of the user, and adjusting the layout between the target report components;
and responding to the configuration submission operation of the user, and acquiring layout information among the target report components and the associated information of the target report components.
In an optional embodiment, the graphical interface comprises an edit entry of the target report component;
responding to the component editing operation of the user, editing the associated information of the target report component, wherein the associated information comprises:
responding to the triggering operation of the user on the editing entry, and displaying an information editing page corresponding to the target report component to the user;
and responding to the editing operation of the user on the information editing page, and taking the data query statement and/or style information of the target report component input by the user as the associated information of the target report component.
In an alternative embodiment, adjusting the layout between the target reporting components in response to the layout adjustment operation by the user includes:
and responding to the dragging and/or zooming operation of the target report component by the user, and adjusting the position and/or the size of the target report component.
In an optional embodiment, generating a report description file according to the layout information between the target report components and the association information of the target report components includes:
responding to a report sending request or a report previewing request of the user, and acquiring layout information among the target report components and associated information of the target report components;
and performing HTML label mapping on the layout information among the target report components and the associated information of the target report components to generate a report description file in an HTML format.
In an optional embodiment, before obtaining the layout information between the target report components and the association information of the target report components, the method further includes:
and storing the layout information among the target report components and the associated information of the target report components in a structured storage mode.
In an optional embodiment, storing the layout information between the target report components and the association information of the target report components in a structured storage manner includes:
storing the associated information of the target report component to a structured component table in the relational database;
and storing the layout information among the target report components into a structured layout table in a relational database.
In an optional embodiment, in response to the report sending request or the report previewing request of the user, acquiring the layout information between the target report components and the association information of the target report components includes:
and responding to a report sending request or a report previewing request of the user, and respectively reading layout information among the target report components and the associated information of the target report components from the layout table and the component table.
In an optional embodiment, storing the layout information between the target report components in a structured layout table in a relational database includes:
decomposing the layout information among the target report components into a report layout ID, an ID of the target report component, and the position and the size of the target report component, and correspondingly storing the report layout ID, the ID of the target report component, and the position and the size of the target report component into the layout table;
storing the associated information of the target report component to a structured component table in the relational database, including:
and resolving the associated information of the target report component into the ID of the target report component, the attribute and the attribute value of the target report component, and correspondingly storing the ID, the attribute and the attribute value into the component table.
In an optional embodiment, the report sending request or the report previewing request includes a report layout ID obtained by disassembling the layout information between the target report components;
reading the layout information between the target report components and the associated information of the target report components from the layout table and the component table respectively, including:
reading the ID of the target report component and the position and the size of the target report component from the layout table according to the report layout ID carried by the report sending request or the report preview request;
and reading the attribute and the attribute value of the target report component from the component table according to the ID of the target report component.
In an optional embodiment, performing HTML tag mapping on the layout information between the target report components and the associated information of the target report components to generate a report description file in an HTML format, including:
defining the report component identified by the ID of the target report component as an HTML label in the report description file in the HTML format;
mapping the attributes and attribute values of the target report form component into the content and/or style of the HTML tag;
and mapping the position and the size of the target report component to the attributes of the HTML tag, wherein the attributes indicate the position and the size of the HTML tag corresponding to the HTML cells.
In an optional embodiment, mapping the attribute and the attribute value of the target report component read from the component table to the content and/or style of the HTML tag includes:
if the attributes of the target report component comprise data attributes, filling result data inquired by a data inquiry statement serving as an attribute value into a position defining the content of the HTML tag in the report description file in the HTML format;
and if the attributes of the target report component comprise style attributes, filling style information serving as attribute values into the position of a CSS file style associated with the tag defining the HTML tag in the report description file in the HTML format.
In an optional embodiment, before responding to the report sending request or report previewing request of the user, the method further comprises:
responding to the component preview operation of the user, and simulating and storing layout information corresponding to a target report component to be previewed so as to obtain a report layout ID corresponding to the target report component to be previewed;
acquiring layout information corresponding to the target report component to be previewed and associated information of the target report component to be previewed according to the report layout ID corresponding to the target report component to be previewed;
generating a component description file according to the layout information corresponding to the target report component to be previewed and the associated information of the target report component to be previewed;
and rendering the component description file to output a component-level data report basis containing the target report component to be previewed.
In an optional embodiment, in response to the component preview operation of the user, simulating to store layout information corresponding to a target report component to be previewed to obtain a report layout ID corresponding to the target report component to be previewed, including:
receiving layout information constructed and sent by a user terminal where the graphical interface is located for the target report component to be previewed;
and disassembling the layout information corresponding to the target report component to be previewed into a report layout ID, the ID of the target report component to be previewed and the position and the size of the target report component to be previewed, and correspondingly storing the report layout ID, the position and the size of the target report component to be previewed into the layout table.
In an optional embodiment, the obtaining, according to the report layout ID corresponding to the target report component to be previewed, the layout information corresponding to the target report component to be previewed and the association information of the target report component to be previewed includes:
receiving a component preview request sent by the user terminal, wherein the component preview request carries a report layout ID disassembled from layout information corresponding to the target report component to be previewed;
reading the ID of the target report component to be previewed and the position and the size of the target report component to be previewed from the layout table according to the report layout ID carried by the component previewing request;
reading the attribute and the attribute value of the target report component to be previewed from the component table according to the ID of the target report component to be previewed;
generating a component description file according to the layout information corresponding to the target report component to be previewed and the associated information of the target report component to be previewed, wherein the method comprises the following steps:
and generating a component description file according to the position and the size of the target report component to be previewed and the attribute value of the target report component to be previewed.
An embodiment of the present application further provides a device for processing a datagram table, including:
the display module is used for displaying a graphical interface, and the graphical interface comprises a draggable report component and a layout panel, so that a user can lay a target report component on the layout panel;
the acquisition module is used for responding to component configuration operation of the user on the graphical interface and acquiring layout information among the target report components and associated information of the target report components;
the generating module is used for generating a report description file according to the layout information among the target report components and the associated information of the target report components;
and the rendering module is used for rendering the report description file so as to output a data report.
In an alternative embodiment, the apparatus further comprises:
and the determining module is used for responding to the dragging operation of the user on the report component, and determining the report component dragged to the layout panel by the user to serve as the target report component.
In an optional implementation manner, the obtaining module is specifically configured to:
responding to the component editing operation of the user, and editing the associated information of the target report component;
responding to the layout adjustment operation of the user, and adjusting the layout between the target report components;
and responding to the configuration submission operation of the user, and acquiring layout information among the target report components and the associated information of the target report components.
In an optional embodiment, the graphical interface comprises an edit entry of the target report component;
the acquisition module is specifically configured to: responding to the triggering operation of the user on the editing entry, and displaying an information editing page corresponding to the target report component to the user; and responding to the editing operation of the user on the information editing page, and taking the data query statement and/or the style information of the target report component input by the user as the associated information of the target report component.
In an optional implementation manner, the obtaining module is specifically configured to:
and responding to the dragging and/or zooming operation of the target report component by the user, and adjusting the position and/or the size of the target report component.
In an optional embodiment, the generating module is specifically configured to:
responding to a report sending request or a report previewing request of the user, and acquiring layout information among the target report components and associated information of the target report components;
and performing HTML label mapping on the layout information among the target report components and the associated information of the target report components to generate a report description file in an HTML format.
In an alternative embodiment, the apparatus further comprises:
and the storage module is used for storing the layout information among the target report components and the associated information of the target report components in a structured storage mode.
In an optional embodiment, the storage module is specifically configured to:
storing the associated information of the target report component to a structured component table in the relational database;
and storing the layout information among the target report components into a structured layout table in a relational database.
In an optional embodiment, when the generating module obtains the layout information between the target report components and the association information of the target report components, the generating module is specifically configured to:
and responding to a report sending request or a report previewing request of the user, and respectively reading layout information among the target report components and the associated information of the target report components from the layout table and the component table.
In an optional embodiment, the storage module is specifically configured to:
decomposing the layout information among the target report components into a report layout ID, an ID of the target report component, and the position and the size of the target report component, and correspondingly storing the report layout ID, the ID of the target report component, and the position and the size of the target report component into the layout table;
and resolving the associated information of the target report component into the ID of the target report component, the attribute and the attribute value of the target report component, and correspondingly storing the ID, the attribute and the attribute value into the component table.
In an optional embodiment, the report sending request or the report previewing request includes a report layout ID obtained by disassembling the layout information between the target report components;
the generating module is specifically configured to, when reading the layout information between the target report components and the association information of the target report components from the layout table and the component table, respectively:
reading the ID of the target report component and the position and the size of the target report component from the layout table according to the report layout ID carried by the report sending request or the report preview request;
and reading the attribute and the attribute value of the target report component from the component table according to the ID of the target report component.
In an optional embodiment, when performing HTML tag mapping on the layout information between the target report components and the association information of the target report components, the generating module is specifically configured to:
defining the report component identified by the ID of the target report component as an HTML label in the report description file in the HTML format;
mapping the attributes and attribute values of the target report form component into the content and/or style of the HTML tag;
and mapping the position and the size of the target report component to the attributes of the HTML tag, wherein the attributes indicate the position and the size of the HTML tag corresponding to the HTML cells.
In an optional embodiment, when the generating module reads the attribute and the attribute value of the target report component from the component table and maps the attribute and the attribute value to the content and/or the style of the HTML tag, the generating module is specifically configured to:
if the attributes of the target report component comprise data attributes, filling result data inquired by a data inquiry statement serving as an attribute value into a position defining the content of the HTML tag in the report description file in the HTML format;
and if the attributes of the target report component comprise style attributes, filling style information serving as attribute values into the position of a CSS file style associated with the tag defining the HTML tag in the report description file in the HTML format.
In an alternative embodiment, the apparatus further comprises:
the component storage module is used for responding to the component preview operation of the user and simulating and storing layout information corresponding to a target report component to be previewed so as to obtain a report layout ID corresponding to the target report component to be previewed;
the acquisition module is further configured to: acquiring layout information corresponding to the target report component to be previewed and associated information of the target report component to be previewed according to the report layout ID corresponding to the target report component to be previewed;
the generation module is further to: generating a component description file according to the layout information corresponding to the target report component to be previewed and the associated information of the target report component to be previewed;
the rendering module is further to: and rendering the component description file to output a component-level data report containing the target report component to be previewed.
In an optional embodiment, the component storage module is specifically configured to:
receiving layout information constructed and sent by a user terminal where the graphical interface is located for the target report component to be previewed;
and disassembling the layout information corresponding to the target report component to be previewed into a report layout ID, the ID of the target report component to be previewed and the position and the size of the target report component to be previewed, and correspondingly storing the report layout ID, the position and the size of the target report component to be previewed into the layout table.
In an optional embodiment, when the obtaining module is configured to obtain the layout information corresponding to the target report component to be previewed and the association information of the target report component to be previewed, the obtaining module is specifically configured to:
receiving a component preview request sent by the user terminal, wherein the component preview request carries a report layout ID disassembled from layout information corresponding to the target report component to be previewed;
reading the ID of the target report component to be previewed and the position and the size of the target report component to be previewed from the layout table according to the report layout ID carried by the component previewing request;
reading the attribute and the attribute value of the target report component to be previewed from the component table according to the ID of the target report component to be previewed;
the generation module, when generating the component description file, is specifically configured to: and generating a component description file according to the position and the size of the target report component to be previewed and the attribute value of the target report component to be previewed.
The embodiment of the application also discloses an electronic device, which comprises one or more memories and one or more processors; the one or more memories are for storing one or more computer instructions that, when executed by the one or more processors, are capable of performing the steps of any of the above-described method embodiments.
The embodiment of the application also discloses a computer readable storage medium storing a computer program, and the computer program can realize the steps in any method embodiment when being executed by a computer.
In the embodiment of the application, the data report processing device provides a graphical interface for a user, the graphical interface comprises a draggable report component and a layout panel, the user drags the report component to the layout panel, the component configuration operation is performed on the graphical interface to complete the layout operation of the report component, a configuration file corresponding to a data report does not need to be compiled, and when the layout of the report component changes at each time, the position and/or the size of the report component only needs to be adjusted through the graphical interface.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1a is a schematic flow chart illustrating a data report processing method according to an embodiment of the present application;
FIG. 1b is a diagram illustrating a layout of report components in a layout panel according to an embodiment of the present application;
FIG. 2a is a schematic diagram of a page of a data query statement corresponding to a user configured target report component according to an embodiment of the present application;
FIGS. 2 b-2 d are schematic diagrams of pages of style information of a user configured target report component according to an embodiment of the present application;
FIG. 3 is a diagram illustrating an implementation structure of a component table and a layout table according to another embodiment of the present application;
fig. 4a is a schematic structural diagram of a data table generation system according to another embodiment of the present application;
FIG. 4b is a schematic view of a graphical interface provided in accordance with another embodiment of the present application;
FIG. 4c is a diagram illustrating a layout between report components in a layout panel according to yet another embodiment of the present application;
FIG. 4d is a code diagram illustrating the attributes and attribute values of a target report component in a component table according to yet another embodiment of the present application;
FIG. 4e is a code diagram illustrating a mapping process of the location and size of the target report component to the location and size of the HTML tag in the layout component according to yet another embodiment of the present application;
FIG. 4f is a schematic diagram illustrating an effect of displaying a data report in a browser according to another embodiment of the present application;
FIG. 4g is a schematic diagram illustrating an effect of displaying a data report in a mailbox according to another embodiment of the present application;
FIG. 5a is a flowchart illustrating a method for previewing report components during a report generation process according to another embodiment of the present application;
FIG. 5b is a diagram illustrating a preview effect of a component in a browser according to another embodiment of the present application;
fig. 6 is a schematic structural diagram of a data report processing apparatus according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In practical application, a data report is used in many scenarios. The data report mainly uses visual components such as tables, graphs and the like to visually display data. The types and styles of data reports are various, and the common data reports include financial data reports, sales data reports, operational data reports and the like. In some scenarios, the data report is primarily intended for the data report provider itself. In other scenes, the data report is mainly used by the data report demander, and in such a scene, the data provider can generate the data report according to the preset data content and report layout and send the data report to the data report demander.
No matter whether the data report is used by a data report provider or a data report demander, or whatever type of data report, the problem of generating the data report is faced. The following embodiments of the present application provide a method for generating a data report, which has the advantages of relatively simple operation, more friendly and flexible layout configuration, easy personalization, and the like, and is beneficial to improving the report generation efficiency.
Fig. 1a is a schematic flow chart of a data report processing method according to an embodiment of the present application. As shown in fig. 1a, the method comprises the steps of:
101. and displaying a graphical interface, wherein the graphical interface comprises a report component and a layout panel which can be dragged, so that a user can lay the target report component on the layout panel.
102. And responding to the component configuration operation of the user on the graphical interface, and acquiring layout information among the target report components and the associated information of the target report components.
103. And generating a report description file according to the layout information among the target report components and the associated information of the target report components.
104. And rendering the report description file to output a data report.
In the present embodiment, referring to step 101, when generating a data report, a graphical interface is presented to a user, and the graphical interface includes a draggable report component and a layout panel. Report components include, but are not limited to: graphs and tables; the graph may be a line graph, a sector graph, a bar graph, etc. These report components are representations of data content in the data report. The layout panel is a partial area in the graphical interface and is used for a user to lay report components.
It should be noted that the embodiment does not limit the implementation form of the graphical interface, and all interface styles that can include the draggable report component and the layout panel are applicable to the embodiment of the present application.
Based on the graphical interface displayed in step 101, the user can select the required report components from the draggable report components on the graphical interface, and drag the required report components to the proper positions in the layout panel according to the report layout requirements. For ease of description and distinction, the report component dragged by the user into the layout panel is referred to as the target report component. The target report component is the report component required by the user to generate the data report. The data report processing device can respond to the dragging operation of a user on the report component, and determine that the report component dragged to the layout panel by the user is used as a target report component.
In a data report, the report component is a representation of the data content. In order to ensure the representation effect of the report component, in this embodiment, in addition to allowing the user to drag the report component to the layout panel, the user is also allowed to perform a configuration operation, referred to as a component configuration operation for short, on the target report component dragged to the layout panel.
Optionally, the component configuration operation includes: and configuring the associated information of the target report component, namely simply called component editing operation. The related information of the target report component mainly refers to information related to the target report component, and may include information of data content that the target report component needs to display, and may also include style information that the target report component needs to display the data content, for example. The information of the data content to be displayed by the target report component may be the data content itself, a link address of the data content, a data query statement for acquiring the data content, and the like.
Optionally, after the user drags the target reporting component to the layout panel, the position and/or size of the target reporting component may be further adjusted. Accordingly, the above component configuration operation may further include: the operation of configuring the layout between target report components is simply referred to as a layout adjustment operation. The layout adjustment operation is mainly a process of adjusting the position and/or size of the target report component on the layout panel by the user. The user can flexibly adjust the position and/or size of the target report component according to the layout requirement of the user.
In the actual application process, when performing the component configuration operation, the user may configure only the association information of the target report components (i.e., perform the component editing operation), or configure only the layout between the target report components (i.e., perform the layout adjustment operation). Of course, the user can also configure both the association information of the target report components (i.e., perform component editing operations) and the layout between the target report components (i.e., perform layout adjustment operations).
For the case where the user performs the component editing operation and the layout adjustment operation at the same time: the data report processing device can respond to the component editing operation of a user, edit the associated information of the target report components, respond to the layout adjustment operation of the user and adjust the layout among the target report components; then, responding to the configuration submission operation of the user, and acquiring layout information among the target report components and associated information of the target report components.
It should be noted that, in the case that the user performs the component editing operation and the layout adjustment operation at the same time, in actual implementation, the user may edit the association information of the target report component every time the user drags one target report component to the layout panel, so that the layout between the target report components is edited after a plurality of target report components are edited; or, a plurality of target report assemblies can be dragged to the layout panel at one time, then the layout among the target report assemblies is edited, and then the associated information of the target report assemblies is edited one by one.
Optionally, when editing the layout between the target report components, the user can change the position of the target report components by dragging the target report components; and zooming the target report component to change the size of the target report component. The data report processing device can adjust the position and/or size of the target report component in response to the dragging and/or zooming operation of the target report component by the user. Or,
optionally, when editing the layout between the target report components, the user can modify the position coordinates of the target report components through the configuration interface to change the position of the target report components; and modifying the height and width parameters or the scaling of the target report component through the configuration interface so as to change the size of the target report component.
Optionally, the user can edit the associated information of the target report component through the information editing page. For example, an edit entry on the graphical interface includes a target reporting component. The edit entry may be a button, icon, or setting option, etc. Based on the method, the user can trigger the component editing operation on the target report component through the editing entry. For example, the user can click or touch the edit entry to trigger a component edit operation on the target report component. For the data report processing device, the information editing page corresponding to the target report component can be displayed to the user in response to the triggering operation of the user on the editing entry, so that the user can edit the associated information of the target report component through the information editing page; and responding to the editing operation of the user on the information editing page, and taking the data query statement and/or the style information of the target report component input by the user as the associated information of the target report component.
Optionally, the information editing pages may be one or more, for example, the information editing pages may be pages independent of the graphical interface, or may be pages embedded in the graphical interface. As shown in FIG. 2a, the page is a page of data query statements corresponding to the user configured target report component. For example, the user may double-click the target reporting component, thereby entering the information editing page shown in fig. 2a, and then input a data query statement, such as an SQL statement, corresponding to the target reporting component in the information editing page. The SQL statements shown in fig. 2a are only examples. Further, as shown in fig. 2 b-2 d, the page is a page where the user configures the style information of the target report component, and by configuring the style of the target report component, it is beneficial to provide a more beautiful data report. For example, the user may configure fonts, font sizes, colors, background colors, borders, line widths, etc. in the target reporting component. Further, it is also possible to configure whether a table component is assembled into an attachment, whether a line and column transposition is performed, or the like. Therefore, the configuration of the report component, the configuration of the component layout and the configuration of the component style can be visualized through the graphical interface.
From the perspective of the data report processing apparatus, as described in step 102, the layout information between the target report components and the association information of the target report components can be obtained in response to the component configuration operation of the user on the graphical interface. At this point, the configuration process of the configuration and layout of the report component ends. In the configuration process, a user only needs to perform simple operations such as dragging, zooming, inputting and the like on the graphical interface, does not need to write a configuration file corresponding to the report layout, and is relatively simple, flexible, convenient and efficient to operate, and the personalized layout is easier to realize.
FIG. 1b is a diagram of a component layout configured on a layout panel by a user. In the component layout illustrated in fig. 1b, a line aggregator component (table-rows-aggregator) is arranged on the left side of the first row, and a line iterator component (table-rows-iterator) is arranged on the left side of the second row; the third arrangement is provided with a data text (text), and the right parts occupying the first row and the second row are provided with a chart (chart-builder: pie). The line iterator component, line aggregator component, data text, pie charts, etc. shown in FIG. 1b are all visualization components in the data report.
For the data report processing apparatus, after obtaining the layout information between the target report components and the association information of the target report components, it is necessary to generate a data report according to the layout information between the target report components and the association information of the target report components, and generate a report description file, as described in step 103. The report description file is a file for describing the data report, and the file not only can reflect the layout of the data report, but also can point to the data content required by the data report. For the device needing to display the data report, different programming languages are generally supported, and the report description file can be realized by adopting different programming languages. For example, the report description file may be a file implemented in java language, a file implemented in c # language, a file implemented in c language, or a file implemented in HTML language.
Continuing with step 104, the data report is output by rendering the report description file. The rendering process mainly refers to a process of loading the target report components and the associated information of the target report components through the report description file, reasonably arranging the layout among the target report components and further presenting the data report.
In this embodiment, a graphical interface is provided for a user, the graphical interface includes a draggable report component and a layout panel, the user drags the report component to the layout panel, and performs component configuration operation on the graphical interface to complete layout operation on the report component, a configuration file corresponding to a data report does not need to be compiled, and when the layout of the report component changes at each time, the position and/or size of the report component only needs to be adjusted through the graphical interface, so that the operation is relatively simple, the report layout component is more friendly and flexible in terms of report layout, and the report generation efficiency is improved.
In either the above or the following embodiments, the presentation of the data report may be involved after the configuration of the report components and component layouts is completed. In an application scenario, a user needs to preview a data report, and at this time, the data report needs to be displayed on the user side. In another application scenario, a user may click a send button to send the data report to the data report demander, and at this time, the data report needs to be displayed on the data report demander side. Regardless of the application scenario, the process of presenting the data report mainly involves a process of generating the data report according to the layout between the previously configured report components and the associated information of the report components.
In an alternative embodiment, a process for presenting a data report includes: responding to a report sending request or a report previewing request of a user, and acquiring layout information among target report components and associated information of the target report components; generating a report description file according to the layout information among the target report components and the associated information of the target report components; and then rendering the report description file to output a data report.
There are many programming languages, such as java, c #, c, HTML, etc., that support data reporting. The HTML language is the most common, most extensive, and most advantageous language, so the HTML language is preferably used to implement the data report in the embodiment of the present application. Based on the method, when the data report needs to be displayed, the method can respond to a report sending request or a report previewing request of a user and acquire layout information among target report components and associated information of the target report components; performing HTML label mapping on the layout information among the target report components and the associated information of the target report components to generate a report description file in an HTML format; and then rendering the report description file in the HTML format, and generating and outputting a data report.
In this embodiment, the HTML tag and the report component on the graphical interface have a corresponding relationship. A report component can be mapped to an HTML tag. In consideration of the fact that the types of report components are relatively rich, the method and the device allow the HTML tags to be expanded, so that the report components on the graphical interface can be mapped into one HTML tag, and further the data report is generated based on the report description document in the HTML format. For example, for report components such as table-rows-iterator, table-rows-aggregator, graph-builder, iterate-printer, text, and the like, corresponding HTML tags may be extended. When the HTML tag is expanded, the data query behavior and the organization mode of the expanded HTML tag are allowed to be defined, so that more various data query behaviors and more flexible data organization modes can be supported. The meaning of the extended HTML tags corresponding to the partial report components is illustrated below by table 1:
TABLE 1
Based on the mapping relationship between the report components and the HTML tags, performing HTML tag mapping on layout information between the target report components and associated information of the target report components to generate a report description file in an HTML format, which is actually: and defining the target report component as an HTML label in a report description file in an HTML format, and defining the associated information of the target report component as the related information of the corresponding HTML label. If the associated information of the target report component comprises the data query statement, defining the result data queried by the data query statement as the content of the corresponding HTML tag; if the associated information of the target report component includes the style information, the style of the target report component may be defined as the style of the corresponding HTML tag, for example, a CSS file corresponding to the corresponding HTML tag is generated according to the style information of the target report component.
And after the report description file in the HTML format is obtained, rendering the report description file in the HTML format to obtain a data report, and displaying the data report to a data report provider or a data report demander. Alternatively, the data report may be presented by a browser, mail, or a report App.
In practical application, before the layout information between the target report components and the associated information of the target report components are used, the layout information between the target report components and the associated information of the target report components can be stored, so that when a report description file needs to be generated, the layout information between the target report components and the associated information of the target report components can be directly read in a corresponding storage space.
In the embodiment of the application, the user is allowed to perform operations such as adding, deleting, modifying, checking and the like on the target report component based on the graphical interface. The layout information among the target report components and/or the associated information of the target report components are influenced by the increase, deletion, modification and check of the front end, and in order to match the increase, deletion, modification and check of the front end, the storage of the layout information among the target report components and the associated information of the target report components in a structured storage mode is an optimal storage mode.
In an optional embodiment, storing the layout information between the target report components and the association information of the target report components in a structured storage manner includes: creating a structured layout table and a structured component table in a relational database; storing the layout information among the target report components into a structured layout table in a relational database; and storing the associated information of the target report component into a structured component table in the relational database. The relational database may employ, but is not limited to: oracle, sqlserver, etc.
Based on the above, when the data report needs to be displayed, for example, when the user triggers the report sending operation or the report previewing operation, the layout information between the target report components and the associated information of the target report components can be respectively read from the layout table and the component table in response to the report sending request or the report previewing request of the user; performing HTML label mapping on the layout information among the target report components and the associated information of the target report components to generate a report description file in an HTML format; and then rendering the report description file in the HTML format, and generating and outputting a data report.
Further, as shown in fig. 3, an implementation structure of the component table and the layout table is shown. Wherein, the component table, whose table name can be zr _ visualization _ comp table, is abbreviated as comp table; the layout table, whose table name can be zr _ visualization _ layout, is abbreviated as layout table. In the table names of the component table and the layout table, zr is a set prefix, visualization means comp means visualization, layout means layout.
Component table: the method is mainly used for storing the associated information of the target report component. More information is generally needed to describe a complete report component, and the information can be used as the associated information of the report component. For example, a table has many attributes, such as a data query statement, column metadata (e.g., header text, data format of each column showing thousandths or percentages, etc.), whether to convert to an attachment and attachment name, whether to transpose rows and columns, etc., a style (width of the table, font size and color of the header table, cell alignment, margin, padding, etc.), and so on. Similarly, a graph (e.g., a line graph, a bar graph, or a pie graph) may also relate to attributes such as a data query statement, xy axial text and style, and title style.
In the component table shown in FIG. 3, the comp _ ID field is used to store the ID of the report component, and each report component has a globally unique ID; storing attribute names such as data query statements, column metadata/axial characters, styles and the like associated with the report components by using the comp _ key field; the comp _ data field is used to store specific data, i.e., attribute values, corresponding to the respective comp _ key. Wherein, a report component may have multiple attributes, and thus, corresponds to multiple combinations of comp _ key and comp _ data.
Layout table: the method is mainly used for storing layout information among target report components. In the layout table shown in fig. 3, a self-added primary key ID field is defined, a layout information layout ID capable of uniquely identifying the layout information is stored in a layout information layout field, and one layout information corresponds to one layout information layout field; since a plurality of report components are wrapped in one layout information, the comp _ id can be used as a foreign key, and the report components included in the layout information can be uniquely identified through the comp _ id field of the comp table. The layout _ uuid and the comp _ id may be in a one-to-one relationship (i.e., one layout information only wraps one report component), or in a one-to-many relationship (i.e., one layout information wraps multiple report components). Alternatively, the layout _ uuid may be a 36-bit alphanumeric string, but is not limited thereto. Alternatively, the layout _ uuid may be used as the file name of the subsequently generated HTML-format report description file, and of course, the integer of the self-increment id may also be used as the file name of the subsequently generated HTML-format report description file.
Further, in the layout table shown in fig. 3, the x-axis coordinate (or x-axis offset), the y-axis coordinate (or y-axis offset), the width and the height of the report component are respectively described by using four fields of x, y, width and height. The four attributes of the report component are converted from the graphical result dragged by the front-end user.
In an alternative embodiment, the four attributes can be translated from the graphical result dragged by the front-end user by the following method: aiming at the layout panel, creating an xy coordinate system of m x n matched with the layout panel; m is the number of unit scales contained in the x axis, n is the number of unit scales contained in the y axis, and m and n are natural numbers; and acquiring the x-axis coordinate, the y-axis coordinate, the width and the height of each target report component based on the xy coordinate system.
Further alternatively, the process of creating the xy coordinate system may be: determining the width direction and the height direction of the layout panel as an x axis and a y axis in an xy coordinate system respectively; taking the ratio of the width of the layout panel to the column number k specified in the width direction as the value of unit scale in an xy coordinate system, wherein m is k; marking m × n grids in an xy coordinate system, wherein n is the value of the height/unit scale of the layout panel; and respectively giving coordinate values to the m × n grids so as to obtain an xy coordinate system of m × n matched with the layout panel.
Further optionally, for each square grid of the m × n square grids, identifying coordinate values of four points on the square grid based on the xy coordinate system; and selecting the minimum coordinate value from the coordinate values of the four points on the square grid as the coordinate value of the square grid.
Further optionally, in the process of obtaining the x-axis coordinate, the y-axis coordinate, the width and the height of each target report component, the position and/or the size of the target report component in the layout panel may be adjusted according to the coverage condition of the target report component on the grid in the xy coordinate system. For example, the target report component is dragged and/or scaled to make the target report component located in q adjacent squares, and the coverage area of the q adjacent squares reaches a set ratio, where q is a natural number. By adjusting the position and/or size of the target report component in the layout panel, the dragging behavior of the user can be standardized, and the accurate identification and digital conversion of the position and/or size of the target report component in the layout panel are facilitated.
Based on the structure of the component table shown in fig. 3, the process of storing the association information of the target report component by the component table may be: and resolving the associated information of the target report component into the ID of the target report component, the attribute and the attribute value of the target report component, and correspondingly storing the ID, the attribute and the attribute value into the component table. In detail, a unique ID is distributed to the target report component and is stored in the comp _ ID field; and decomposing the associated information of the target report component into attributes and attribute values, and respectively storing the attributes and the attribute values into the fields comp _ key and comp _ data.
Based on the structure of the layout table shown in fig. 3, the process of storing layout information between target report components through the layout table may be: and decomposing the layout information among the target report components into a report layout ID, an ID of the target report component, and the position and the size of the target report component, and correspondingly storing the report layout ID, the ID of the target report component and the position and the size of the target report component into a layout table. In detail, a unique report layout ID is allocated to a target report component and stored in a layout _ uuid field, the ID of the target report component wrapped by layout information among the target report components is stored in a comp _ ID field, and the dragging operation of a front-end user is converted to obtain the x-axis coordinate, the y-axis coordinate, the width and the height of each target report component and respectively store the x-axis coordinate, the y-axis coordinate, the width and the height to four fields of x, y, width and height.
After storing the layout information between the target report components and the association information of the target report components in the layout table and the component table shown in fig. 3, the report layout ID corresponding to the layout information between the target report components can be obtained. Based on this, when the user triggers the report sending operation or the report previewing operation, the report sending request or the report previewing request carries the report layout ID. For the data report processing device, the ID of the target report component and the position and the size of the target report component can be read from the layout table according to the report layout ID carried in the report sending request or the report preview request in response to the report sending request or the report preview request of a user; then, reading the attribute and the attribute value of the target report component from the component table according to the ID of the target report component; then, defining the report component identified by the ID of the target report component as an HTML label in a report description file in an HTML format; mapping the attribute and the attribute value of the target report component into the content and/or the style of the HTML label; mapping the position and the size of a target report component into attributes of an HTML (hypertext markup language) tag, wherein the attributes indicate the position and the size of an HTML cell corresponding to the HTML tag, so that a report description file in an HTML format is obtained; and further rendering the report description file in the HTML format, and generating and outputting a data report.
Further optionally, the mapping the attributes and attribute values of the target report component to the content and/or style of the HTML tag includes: if the attributes of the target report component comprise data attributes, filling result data inquired by a data inquiry statement serving as an attribute value to a position defining the content of an HTML (hypertext markup language) tag in a report description file in an HTML format; if the attributes of the target report component comprise style attributes, filling the style information serving as the attribute values into the positions of the styles defining the HTML tags in the report description file in the HTML format. It is noted that, in addition to defining the style of the HTML tag in the report description file in the HTML format, the style of the HTML tag may be defined using a CSS file.
In practical applications, the data report processing method provided by the above embodiment can be implemented on an independent device, such as a personal computer, a server, or a mobile phone. In addition, the data report processing method provided by the above embodiment of the present application can also be implemented by a data report generating system. Fig. 4a is a schematic structural diagram of a data table generation system according to an embodiment of the present application. As shown in fig. 4a, the system includes a user terminal 10, a server 20, and a relational database 30. The user terminal 10 mainly refers to a data report provider, that is, a party that needs to generate a data report. In implementation, the user terminal 10 needs to be capable of communicating with the server 20, and needs to have an interface presentation function, which may be, for example, a browser or a report APP, and mainly provides a graphical interface for a user and supports an interactive operation with the user. The server 20 is located at the network side or the cloud side, and serves the client, and mainly provides control logic for data table generation and bottom layer services. The relational database 30 is mainly used for storing information related to the report components in the report component processing process, such as layout information between the report components and association information of the report components.
Based on the system shown in fig. 4a, the generation process of the data report includes:
the server 20 displays a graphical interface to the user through the user terminal 10, and the user terminal 10 displays the graphical interface to the user, where the graphical interface includes a draggable report component and a layout panel, so that the user can lay out a target report component on the layout panel.
Alternatively, a patterned interface is shown in FIG. 4 b. In fig. 4b, the area indicated by the upper left box is a mail sending information configuration area; the area shown by the upper right square box is a high-level setting area; the lower square is shown as a layout panel and a report component area; the area indicated by the dotted line frame in the lower square frame is a layout panel, the right side of the layout panel is a report component area, and the report component area comprises a draggable report component.
The user terminal 10 determines the report component dragged to the layout panel by the user as a target report component in response to the dragging operation of the report component by the user. As shown in FIG. 4b, the report component in the layout panel is the target report component dragged by the user onto the layout panel.
For the user, the report components are dragged to the layout panel, the layout among the report components is adjusted, and the associated information of the report components is configured. When the last operation is completed, a "save" (or other related button) may be clicked, triggering a configuration commit operation. The user terminal 10 may obtain the layout information between the target report components and the association information of the target report components in response to the component configuration operation of the user on the graphical interface, and send the layout information between the target report components and the association information of the target report components to the server 20 in response to the configuration submission operation of the user. As shown in FIG. 4c, the layout between report components in the layout panel is the layout of the components that the user has laid out finally.
For the server 20, receiving layout information between target report components and association information of the target report components sent by the user terminal 10; the layout information between the target report components and the association information of the target report components are then stored into the structured layout table and component table in the relational database 30. For example, layout information between target report components and association information of the target report components may be stored in the layout table and component table shown in FIG. 3. In addition, the server 20 returns a report layout ID to the user terminal 10, so that the user terminal 10 can know the layout information between the current target report components and the unique identifier corresponding to the association information of the target report components.
Further, when the user needs to preview the layout of the data report, the user can click a "preview template" button on the graphical interface shown in fig. 4b, thereby triggering a report preview operation. Or, when the user needs to send the data report to the data report demander, the user may click an "send immediately" button on the graphical interface shown in fig. 4b, thereby triggering the report sending operation. For the user terminal 10, in response to a report sending operation or a report previewing operation of the user on the graphical interface, a report sending request or a report previewing request is sent to the server 20, and the report sending request or the report previewing request carries the report layout ID. For the server 20, a report sending request or a report previewing request is received. Then, the server 20 reads the ID of the target report component and the position and size of the target report component from the layout table of the relational database 30 according to the report layout ID carried by the report sending request or the report preview request, and reads the attribute and the attribute value of the target report component from the component table of the relational database 30 according to the ID of the target report component.
Further, the server 20 defines the report component identified by the ID of the target report component as an HTML tag; mapping the attribute and the attribute value of the target report component into the content and/or the style of the HTML label; mapping the position and the size of the target report component into the position and the size of an HTML label so as to obtain a report description file in an HTML format; and further rendering the report description file in the HTML format, and generating and outputting a data report. FIG. 4d shows a mapping process of the attributes and attribute values of the target report component in the component table to the content and/or style of the HTML tag. The mapping process is actually a process of correspondingly filling the attribute and the attribute value of the target report component into the tag in the file template corresponding to the report description file in the HTML format. In the above-mentioned document template, some basic codes, such as body (body), div with the outermost layer as a container, and optionally the uppermost CSS may also be included. It is worth noting that the CSS carried by the file template generally defines a default style; if the attributes of the target reporting component include style attributes, the attributes can be mapped into the CSS during the mapping process, and the styles have higher priority and override the default style originally defined by the CSS.
Further, as shown in FIG. 4e, is a mapping process of the position and size of the target report component in the layout component to the position and size of the HTML tag. The location identified by the box in fig. 4e is the redundancy attribute corresponding to the corresponding HTML tag.
Through the above process, the data report shown in the browser in fig. 4f can be obtained, or the data report shown in the mailbox in fig. 4g can be obtained. It should be noted that fig. 4f and 4g focus on the style or layout of the data report, and do not focus on specific values in the data report.
In the embodiment, besides allowing the user to send the data report to the data report demander, the online preview of the data report is supported, so that the user can timely obtain the display effect of the data report so as to adjust and optimize the data report.
It should be noted that, in the process of previewing the data report or sending the data report by the user, the user depends on the report layout ID corresponding to the layout information. Based on this, when the user previews or sends the data report, if the layout information between the target report components corresponding to the data report is already stored, which means that the user terminal 10 has already acquired the report layout ID, the report layout ID may be directly acquired from the local and added to the report preview request or the report sending request to be sent to the server 20; if the layout information between the target report components corresponding to the data report is that the user has just edited and has not yet saved, which means that the user terminal 10 has not yet obtained the report layout ID, the layout information between the target report components needs to be submitted to the server 20 first, and the report layout ID is returned after being saved by the server 20, and then the report layout ID can be added to the report preview request or the report sending request and sent to the server 20.
In the above embodiment, the operation of previewing the data report is related, and the "preview" in the above embodiment is a report-level preview, that is, based on the layout information between report components edited by the user and the association information of the report components, the user is allowed to preview the display effect of the complete data report in advance. In addition, the embodiment of the application also provides a component-level preview function, namely, a user is allowed to preview the display effect of a target report component after the target report component is laid, so that report components which are laid wrongly or not in mind can be adjusted and optimized.
The embodiment of the present application does not limit how to implement the component-level preview function, and all implementation manners that can implement the component-level preview function are applicable to the embodiment of the present application. Optionally, in order to be compatible with the report-level preview implementation scheme, achieve the purpose of code reuse, and reduce changes to underlying codes, an optional implementation manner of the component-level preview function is provided in the embodiment of the present application. The core principle of this alternative embodiment is: considering that the preview at the component level is lack of layout information among report components and further lack of report layout IDs (identities), after a user lays a target report component, responding to the component preview operation of the user, the layout information corresponding to the target report component to be previewed can be stored in a simulated mode to obtain the report layout ID corresponding to the target report component to be previewed, and therefore the layout information corresponding to the target report component to be previewed and the associated information of the target report component to be previewed can be obtained on the basis of the report layout ID corresponding to the target report component to be previewed; generating a component description file according to the layout information corresponding to the target report component to be previewed and the associated information of the target report component to be previewed; and rendering the component description file to output a component-level data report containing the target report component to be previewed, so that a user can obtain the display effect of the target report component to be previewed, and timely adjustment and optimization are facilitated.
Based on the above, an optional implementation manner of previewing the report component display effect in the report generation process, as shown in fig. 5a, includes the following steps:
501. the user terminal displays a graphical interface to a user, wherein the graphical interface comprises a report component and a layout panel which can be dragged, and the user can lay a target report component on the layout panel.
502. And the user terminal responds to the dragging operation of the user on the report component, and determines the report component dragged to the layout panel by the user to serve as the target report component.
503. And the user terminal responds to the component editing operation of the user aiming at the target report component, and acquires the associated information of the target report component.
504. And the user terminal responds to the editing and saving operation of the user aiming at the target report form component and sends the associated information of the target report form component to the server side.
505. And the server side disassembles the associated information of the target report component into the ID of the target report component, the attribute and the attribute value of the target report component, and correspondingly stores the ID, the attribute and the attribute value into a structural component table of the relational database.
506. And the server returns the ID of the target report component to the user terminal.
507. And the user terminal responds to the component preview operation of the user aiming at the target report component, and constructs layout information for the target report component to be previewed.
The target report component to be previewed is the target report component requested to be previewed by the user.
From the perspective of the user, the purpose of the component preview operation is to check whether the report component is correct or reasonable, and actually does not pay attention to the layout of the report component, so that the report component is only required to be presented to the user. Therefore, the layout information corresponding to the target report component to be previewed can be flexibly and randomly constructed. The layout information corresponding to the target report component to be previewed is actually four parameters of x, y, width and height.
Optionally, if the upper left corner of the data report is set to show the target report component to be previewed, values of x and y in the parameters x, y, width, and height may be configured to be 0 (i.e., the upper left corner), and width and height may be default values, for example, 1 unit, 2 units, and the like. Wherein, 1 unit represents how many pixels, and depends on the specific application requirement, for example, 1 unit can represent 100 px. In addition, the number of units for width and height may vary.
508. And the user terminal sends the layout information corresponding to the target report component to be previewed to the server side, wherein the layout information corresponding to the target report component to be previewed carries the ID of the target report component to be previewed.
509. The server side disassembles the layout information corresponding to the target report component to be previewed into a report layout ID, an ID of the target report component to be previewed and the position and size of the target report component to be previewed, and correspondingly stores the report layout ID, the position and the size of the target report component to be previewed into a structured layout table of a relational database.
510. And the server receives a component preview request sent by the user terminal, wherein the component preview request carries a report layout ID disassembled from layout information corresponding to a target report component to be previewed.
511. And the server reads the ID of the target report component to be previewed and the position and the size of the target report component to be previewed from the layout table according to the report layout ID carried by the component preview request.
512. And the server reads the attribute and the attribute value of the target report component to be previewed from the component table according to the ID of the target report component to be previewed.
513. And the server generates a component description file according to the position and the size of the target report component to be previewed and the attribute value of the target report component to be previewed.
514. And rendering the component description file by the server side so as to output a component-level data report containing the target report component to be previewed.
Assuming that the target report component to be previewed is a table, the component-level data report shown in fig. 5b can be obtained through the above operations. In FIG. 5b, only a portion of the component-level data report is shown.
In the embodiment, the preview of the component level is introduced, so that a user can obtain the display effect of the report component in time, timely adjustment and optimization are facilitated, and the generation efficiency of the data report is improved; in addition, the layout information corresponding to the target report component to be previewed is automatically simulated and stored, and the report layout ID corresponding to the target report component to be previewed is obtained, so that the preview of the component level can be realized by adopting a report level preview realization scheme, the code reuse is realized, the change of the bottom layer code is relatively small, and the realization cost is low.
It should be noted that the execution subjects of the steps of the methods provided in the above embodiments may be the same device, or different devices may be used as the execution subjects of the methods. For example, the execution subjects of steps 101 to 104 may be device a; for another example, the execution subject of steps 101 and 102 may be device a, and the execution subject of steps 103 and 104 may be device B; and so on.
Fig. 6 is a schematic structural diagram of a data report processing apparatus according to another embodiment of the present application. As shown in fig. 6, the apparatus includes: a presentation module 61, an acquisition module 62, a generation module 63, and a rendering module 64.
And the display module 61 is used for displaying a graphical interface, wherein the graphical interface comprises a report component and a layout panel which can be dragged, so that a user can lay a target report component on the layout panel.
And the obtaining module 62 is configured to obtain layout information between the target report components and association information of the target report components in response to component configuration operation of a user on the graphical interface.
And the generating module 63 is configured to generate a report description file according to the layout information between the target report components and the association information of the target report components.
And the rendering module 64 is used for rendering the report description file so as to output a data report.
In an alternative embodiment, the apparatus further comprises: and the determining module is used for responding to the dragging operation of the user on the report component, and determining the report component dragged to the layout panel by the user as a target report component.
In an optional embodiment, the obtaining module 62 is specifically configured to:
editing the associated information of the target report component in response to the component editing operation of the user;
responding to the layout adjustment operation of the user, and adjusting the layout between the target report components;
and responding to the configuration submission operation of the user, and acquiring layout information among the target report components and the associated information of the target report components.
In an optional embodiment, the graphical interface comprises an edit entry of the target report component. Based on this, when the obtaining module 62 edits the association information of the target report component, it is specifically configured to: responding to the triggering operation of the user on the editing entry, and displaying an information editing page corresponding to the target report component to the user; and responding to the editing operation of the user on the information editing page, and taking the data query statement and/or the style information of the target report component input by the user as the associated information of the target report component.
In an optional embodiment, when adjusting the layout between the target report components, the obtaining module 62 is specifically configured to: and adjusting the position and/or size of the target report component in response to the dragging and/or zooming operation of the target report component by the user.
In an optional embodiment, the generating module 63 is specifically configured to: responding to a report sending request or a report previewing request of a user, and acquiring layout information among target report components and associated information of the target report components; and performing HTML label mapping on the layout information among the target report components and the associated information of the target report components to generate a report description file in an HTML format.
In an alternative embodiment, the apparatus further comprises: and the storage module is used for storing the layout information among the target report assemblies and the associated information of the target report assemblies in a structured storage mode.
In an optional embodiment, the storage module is specifically configured to: storing the associated information of the target report component into a structured component table in a relational database; and storing the layout information among the target report components into a structured layout table in the relational database.
In an optional embodiment, when obtaining the layout information between the target report components and the association information of the target report components, the generating module 63 is specifically configured to: and responding to a report sending request or a report previewing request of a user, and respectively reading layout information among the target report components and the associated information of the target report components from the layout table and the component table.
In an optional embodiment, the storage module is specifically configured to: decomposing the layout information among the target report components into a report layout ID, an ID of the target report component, and the position and the size of the target report component, and correspondingly storing the report layout ID, the ID of the target report component and the position and the size of the target report component into a layout table; and resolving the associated information of the target report component into the ID of the target report component, the attribute and the attribute value of the target report component, and correspondingly storing the ID, the attribute and the attribute value into the component table.
In an optional embodiment, the report sending request or the report previewing request includes a report layout ID disassembled from the layout information between the target report components. Based on this, when the generating module 63 reads the layout information between the target report components and the association information of the target report components from the layout table and the component table, respectively, it is specifically configured to:
reading the ID of the target report component and the position and the size of the target report component from the layout table according to the report layout ID carried by the report sending request or the report preview request;
and reading the attribute and the attribute value of the target report component from the component table according to the ID of the target report component.
In an optional embodiment, when performing HTML tag mapping on the layout information between target report components and the association information of the target report components, the generating module 63 is specifically configured to:
defining the report component identified by the ID of the target report component as an HTML label in a report description file in an HTML format;
mapping the attribute and the attribute value of the target report component into the content and/or the style of the HTML label;
and mapping the position and the size of the target report component into the attributes of the HTML tag, wherein the attributes indicate the position and the size of the HTML tag corresponding to the HTML cell.
In an optional embodiment, when the attribute and the attribute value of the target report component are read from the component table and mapped to the content and/or the style of the HTML tag, the generating module 63 is specifically configured to:
if the attributes of the target report component comprise data attributes, filling result data inquired by a data inquiry statement serving as an attribute value to a position defining the content of an HTML (hypertext markup language) tag in a report description file in an HTML format;
and if the attributes of the target report component comprise style attributes, filling style information serving as attribute values into the positions of the styles defining the HTML tags in the report description file in the HTML format.
In an alternative embodiment, the apparatus further comprises: and the component storage module is used for responding to the component preview operation of the user and simulating and storing the layout information corresponding to the target report component to be previewed so as to obtain the report layout ID corresponding to the target report component to be previewed. Based on this, the obtaining module 62 is further configured to: and acquiring layout information corresponding to the target report component to be previewed and associated information of the target report component to be previewed according to the report layout ID corresponding to the target report component to be previewed. Accordingly, the generating module 63 is further configured to: and generating a component description file according to the layout information corresponding to the target report component to be previewed and the associated information of the target report component to be previewed. Accordingly, the rendering module 64 is further configured to: and rendering the component description file to output a component-level data report containing the target report component to be previewed.
In an optional embodiment, the component storage module is specifically configured to: receiving layout information constructed and sent for a target report component to be previewed by a user terminal where a graphical interface is located; and disassembling the layout information corresponding to the target report component to be previewed into a report layout ID, an ID of the target report component to be previewed and the position and size of the target report component to be previewed, and correspondingly storing the report layout ID, the position and the size of the target report component to be previewed into a layout table.
In an optional embodiment, the obtaining module 62 is specifically configured to, when configured to obtain the layout information corresponding to the target report component to be previewed and the association information of the target report component to be previewed:
receiving a component preview request sent by a user terminal, wherein the component preview request carries a report layout ID disassembled from layout information corresponding to a target report component to be previewed;
reading the ID of the target report component to be previewed and the position and the size of the target report component to be previewed from the layout table according to the report layout ID carried by the component previewing request;
and reading the attribute and the attribute value of the target report component to be previewed from the component table according to the ID of the target report component to be previewed.
In an optional embodiment, when the generating module 63 generates the component description file, it is specifically configured to:
and generating a component description file according to the position and the size of the target report component to be previewed and the attribute value of the target report component to be previewed.
The data report processing apparatus provided in this embodiment may be used to execute the process of the data report processing method, and the working principle of the data report processing apparatus is not described in detail, for details, see the description of the method embodiment.
The data report processing apparatus provided in this embodiment may be a device that performs data report processing independently, or may be a server device that performs data report processing in cooperation with a user terminal.
The data report processing device provided by the embodiment provides a graphical interface for a user, the graphical interface comprises a draggable report component and a layout panel, the user drags the report component to the layout panel, the component configuration operation is performed on the graphical interface to complete the layout operation of the report component, a configuration file corresponding to a data report does not need to be compiled, and when the layout of the report component changes at every time, the position and/or the size of the report component only needs to be adjusted through the graphical interface, the operation is relatively simple, the data report processing device is more friendly and flexible in terms of layout of the report component, and the report generation efficiency is favorably improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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 invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (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 computer storage media 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 that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
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 an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, 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 above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
The embodiment of the application discloses A1, a data report processing method, including:
displaying a graphical interface, wherein the graphical interface comprises a report component and a layout panel which can be dragged, and a user can lay a target report component on the layout panel;
responding to the component configuration operation of the user on the graphical interface, and acquiring layout information among the target report components and associated information of the target report components;
generating a report description file according to the layout information among the target report components and the associated information of the target report components;
and rendering the report description file to output a data report.
A2, the method of A1, further comprising, prior to a component configuration operation in response to the user on the graphical interface:
and responding to the dragging operation of the user on the report component, and determining the report component dragged to the layout panel by the user as the target report component.
A3, the method as in A1, wherein the obtaining layout information among the target report components and the association information of the target report components in response to the component configuration operation of the user on the graphical interface includes:
responding to the component editing operation of the user, and editing the associated information of the target report component;
responding to the layout adjustment operation of the user, and adjusting the layout between the target report components;
and responding to the configuration submission operation of the user, and acquiring layout information among the target report components and the associated information of the target report components.
A4, the method as in A3, wherein the graphical interface includes an edit entry for the target report component;
responding to the component editing operation of the user, editing the associated information of the target report component, wherein the associated information comprises:
responding to the triggering operation of the user on the editing entry, and displaying an information editing page corresponding to the target report component to the user;
and responding to the editing operation of the user on the information editing page, and taking the data query statement and/or style information of the target report component input by the user as the associated information of the target report component.
A5, the method of A3, wherein adjusting the layout between the target report components in response to the user's layout adjustment operation comprises:
and responding to the dragging and/or zooming operation of the target report component by the user, and adjusting the position and/or the size of the target report component.
The method of any one of a6, a1-a5, wherein generating a report description file according to the layout information between the target report components and the association information of the target report components includes:
responding to a report sending request or a report previewing request of the user, and acquiring layout information among the target report components and associated information of the target report components;
and performing HTML label mapping on the layout information among the target report components and the associated information of the target report components to generate a report description file in an HTML format.
A7, the method of A6, wherein before obtaining layout information between the target report components and the association information of the target report components, the method further comprises:
and storing the layout information among the target report components and the associated information of the target report components in a structured storage mode.
A8, the method of A7, wherein the storing the layout information between the target report components and the association information of the target report components in a structured storage manner, comprises:
storing the associated information of the target report component to a structured component table in the relational database;
and storing the layout information among the target report components into a structured layout table in a relational database.
A9, the method as in A8, wherein the obtaining layout information between the target report components and the association information of the target report components in response to the report sending request or the report previewing request of the user includes:
and responding to a report sending request or a report previewing request of the user, and respectively reading layout information among the target report components and the associated information of the target report components from the layout table and the component table.
A10, the method of A9, wherein storing the layout information between the target report components in a structured layout table in a relational database, comprises:
decomposing the layout information among the target report components into a report layout ID, an ID of the target report component, and the position and the size of the target report component, and correspondingly storing the report layout ID, the ID of the target report component, and the position and the size of the target report component into the layout table;
storing the associated information of the target report component to a structured component table in the relational database, including:
and resolving the associated information of the target report component into the ID of the target report component, the attribute and the attribute value of the target report component, and correspondingly storing the ID, the attribute and the attribute value into the component table.
A11, the method as in A10, wherein the report sending request or report previewing request includes a report layout ID disassembled from the layout information between the target report components;
reading the layout information between the target report components and the associated information of the target report components from the layout table and the component table respectively, including:
reading the ID of the target report component and the position and the size of the target report component from the layout table according to the report layout ID carried by the report sending request or the report preview request;
and reading the attribute and the attribute value of the target report component from the component table according to the ID of the target report component.
A12, the method as in a11, wherein the HTML tag mapping is performed on the layout information between the target report components and the associated information of the target report components to generate a report description file in HTML format, the method includes:
defining the report component identified by the ID of the target report component as an HTML label in the report description file in the HTML format;
mapping the attributes and attribute values of the target report form component into the content and/or style of the HTML tag;
and mapping the position and the size of the target report component to the attributes of the HTML tag, wherein the attributes indicate the position and the size of the HTML tag corresponding to the HTML cells.
A13, the method of A12, wherein the step of mapping the attributes and attribute values of the target report components read from the component table to the content and/or style of the HTML tags includes:
if the attributes of the target report component comprise data attributes, filling result data inquired by a data inquiry statement serving as an attribute value into a position defining the content of the HTML tag in the report description file in the HTML format;
and if the attributes of the target report component comprise style attributes, filling style information serving as attribute values into the positions of the styles defining the HTML tags in the report description file in the HTML format.
A14, the method as in A10, wherein before responding to the user's report sending request or report previewing request, the method further comprises:
responding to the component preview operation of the user, and simulating and storing layout information corresponding to a target report component to be previewed so as to obtain a report layout ID corresponding to the target report component to be previewed;
acquiring layout information corresponding to the target report component to be previewed and associated information of the target report component to be previewed according to the report layout ID corresponding to the target report component to be previewed;
generating a component description file according to the layout information corresponding to the target report component to be previewed and the associated information of the target report component to be previewed;
and rendering the component description file to output a component-level data report containing the target report component to be previewed.
A15, the method of A14, wherein the simulating storing layout information corresponding to a target report component to be previewed in response to the component previewing operation of the user to obtain a report layout ID corresponding to the target report component to be previewed includes:
receiving layout information constructed and sent by a user terminal where the graphical interface is located for the target report component to be previewed;
and disassembling the layout information corresponding to the target report component to be previewed into a report layout ID, the ID of the target report component to be previewed and the position and the size of the target report component to be previewed, and correspondingly storing the report layout ID, the position and the size of the target report component to be previewed into the layout table.
A16, the method as in a15, where the obtaining layout information corresponding to the target report component to be previewed and the association information of the target report component to be previewed according to the report layout ID corresponding to the target report component to be previewed includes:
receiving a component preview request sent by the user terminal, wherein the component preview request carries a report layout ID disassembled from layout information corresponding to the target report component to be previewed;
reading the ID of the target report component to be previewed and the position and the size of the target report component to be previewed from the layout table according to the report layout ID carried by the component previewing request;
reading the attribute and the attribute value of the target report component to be previewed from the component table according to the ID of the target report component to be previewed;
generating a component description file according to the layout information corresponding to the target report component to be previewed and the associated information of the target report component to be previewed, wherein the method comprises the following steps:
and generating a component description file according to the position and the size of the target report component to be previewed and the attribute value of the target report component to be previewed.
The embodiment of the present application further discloses B17, a datagram table processing apparatus, including:
the display module is used for displaying a graphical interface, and the graphical interface comprises a draggable report component and a layout panel, so that a user can lay a target report component on the layout panel;
the acquisition module is used for responding to component configuration operation of the user on the graphical interface and acquiring layout information among the target report components and associated information of the target report components;
the generating module is used for generating a report description file according to the layout information among the target report components and the associated information of the target report components;
and the rendering module is used for rendering the report description file so as to output a data report.
B18, the apparatus of B17 further comprising:
and the determining module is used for responding to the dragging operation of the user on the report component, and determining the report component dragged to the layout panel by the user to serve as the target report component.
B19, the apparatus of B17, wherein the obtaining module is specifically configured to:
responding to the component editing operation of the user, and editing the associated information of the target report component;
responding to the layout adjustment operation of the user, and adjusting the layout between the target report components;
and responding to the configuration submission operation of the user, and acquiring layout information among the target report components and the associated information of the target report components.
B20, in the apparatus as described in B19, an edit portal of the target report component is included on the graphical interface;
the acquisition module is specifically configured to: responding to the triggering operation of the user on the editing entry, and displaying an information editing page corresponding to the target report component to the user; and responding to the editing operation of the user on the information editing page, and taking the data query statement and/or the style information of the target report component input by the user as the associated information of the target report component.
B21, the apparatus of B19, wherein the obtaining module is specifically configured to:
and responding to the dragging and/or zooming operation of the target report component by the user, and adjusting the position and/or the size of the target report component.
B22, the apparatus according to any of B17-B21, wherein the generating module is specifically configured to:
responding to a report sending request or a report previewing request of the user, and acquiring layout information among the target report components and associated information of the target report components;
and performing HTML label mapping on the layout information among the target report components and the associated information of the target report components to generate a report description file in an HTML format.
B23, the apparatus of B22 further comprising:
and the storage module is used for storing the layout information among the target report components and the associated information of the target report components in a structured storage mode.
B24, the apparatus of B23, wherein the storage module is specifically configured to:
storing the associated information of the target report component to a structured component table in the relational database;
and storing the layout information among the target report components into a structured layout table in a relational database.
B25, in the apparatus according to B24, when the generating module obtains the layout information between the target report components and the association information of the target report components, specifically:
and responding to a report sending request or a report previewing request of the user, and respectively reading layout information among the target report components and the associated information of the target report components from the layout table and the component table.
B26, the apparatus of B25, wherein the storage module is specifically configured to:
decomposing the layout information among the target report components into a report layout ID, an ID of the target report component, and the position and the size of the target report component, and correspondingly storing the report layout ID, the ID of the target report component, and the position and the size of the target report component into the layout table;
and resolving the associated information of the target report component into the ID of the target report component, the attribute and the attribute value of the target report component, and correspondingly storing the ID, the attribute and the attribute value into the component table.
B27, in the apparatus according to B26, the report sending request or report previewing request includes a report layout ID disassembled from the layout information between the target report components;
the generating module is specifically configured to, when reading the layout information between the target report components and the association information of the target report components from the layout table and the component table, respectively:
reading the ID of the target report component and the position and the size of the target report component from the layout table according to the report layout ID carried by the report sending request or the report preview request;
and reading the attribute and the attribute value of the target report component from the component table according to the ID of the target report component.
B28, in the apparatus of B27, when performing HTML tag mapping on the layout information between the target report components and the association information of the target report components, the generating module is specifically configured to:
defining the report component identified by the ID of the target report component as an HTML label in the report description file in the HTML format;
mapping the attributes and attribute values of the target report form component into the content and/or style of the HTML tag;
and mapping the position and the size of the target report component to the attributes of the HTML tag, wherein the attributes indicate the position and the size of the HTML tag corresponding to the HTML cells.
B29, in the apparatus according to B28, when the attribute and the attribute value of the target report component are read from the component table and mapped to the content and/or style of the HTML tag, the generating module is specifically configured to:
if the attributes of the target report component comprise data attributes, filling result data inquired by a data inquiry statement serving as an attribute value into a position defining the content of the HTML tag in the report description file in the HTML format;
and if the attributes of the target report component comprise style attributes, filling style information serving as attribute values into the positions of the styles defining the HTML tags in the report description file in the HTML format.
B30, the apparatus of B26 further comprising:
the component storage module is used for responding to the component preview operation of the user and simulating and storing layout information corresponding to a target report component to be previewed so as to obtain a report layout ID corresponding to the target report component to be previewed;
the acquisition module is further configured to: acquiring layout information corresponding to the target report component to be previewed and associated information of the target report component to be previewed according to the report layout ID corresponding to the target report component to be previewed;
the generation module is further to: generating a component description file according to the layout information corresponding to the target report component to be previewed and the associated information of the target report component to be previewed;
the rendering module is further to: and rendering the component description file to output a component-level data report containing the target report component to be previewed.
B31, the apparatus of B30, wherein the component storage module is specifically configured to:
receiving layout information constructed and sent by a user terminal where the graphical interface is located for the target report component to be previewed;
and disassembling the layout information corresponding to the target report component to be previewed into a report layout ID, the ID of the target report component to be previewed and the position and the size of the target report component to be previewed, and correspondingly storing the report layout ID, the position and the size of the target report component to be previewed into the layout table.
B32, in the apparatus according to B31, when the obtaining module is configured to obtain the layout information corresponding to the target report component to be previewed and the association information of the target report component to be previewed, specifically configured to:
receiving a component preview request sent by the user terminal, wherein the component preview request carries a report layout ID disassembled from layout information corresponding to the target report component to be previewed;
reading the ID of the target report component to be previewed and the position and the size of the target report component to be previewed from the layout table according to the report layout ID carried by the component previewing request;
reading the attribute and the attribute value of the target report component to be previewed from the component table according to the ID of the target report component to be previewed;
the generation module, when generating the component description file, is specifically configured to:
and generating a component description file according to the position and the size of the target report component to be previewed and the attribute value of the target report component to be previewed.
The embodiment of the application also discloses C33, an electronic device, comprising one or more memories and one or more processors; the one or more memories are for storing one or more computer instructions that, when executed by the one or more processors, are capable of performing the steps of the method of any of the above-mentioned a1-a 16.
The embodiment of the application also discloses D34 and a computer readable storage medium storing a computer program, wherein the computer program can realize the steps in the method of any one of A1-A16 when being executed by a computer.
Claims (10)
1. A method for handling datagrams, comprising:
displaying a graphical interface, wherein the graphical interface comprises a report component and a layout panel which can be dragged, and a user can lay a target report component on the layout panel;
responding to the component configuration operation of the user on the graphical interface, and acquiring layout information among the target report components and associated information of the target report components;
generating a report description file according to the layout information among the target report components and the associated information of the target report components;
and rendering the report description file to output a data report.
2. The method of claim 1, wherein generating a report description file according to the layout information between the target report components and the association information of the target report components comprises:
responding to a report sending request or a report previewing request of the user, and acquiring layout information among the target report components and associated information of the target report components;
and performing HTML label mapping on the layout information among the target report components and the associated information of the target report components to generate a report description file in an HTML format.
3. The method of claim 2, wherein prior to obtaining layout information between the target reporting components and the association information of the target reporting components, the method further comprises:
and storing the layout information among the target report components and the associated information of the target report components in a structured storage mode.
4. The method of claim 3, wherein storing the layout information between the target reporting components and the association information of the target reporting components in a structured storage manner comprises:
storing the associated information of the target report component to a structured component table in the relational database;
and storing the layout information among the target report components into a structured layout table in a relational database.
5. The method of claim 4, wherein obtaining layout information between the target report components and the association information of the target report components in response to a report sending request or a report previewing request of the user comprises:
and responding to a report sending request or a report previewing request of the user, and respectively reading layout information among the target report components and the associated information of the target report components from the layout table and the component table.
6. The method of claim 5, wherein storing layout information between the target reporting components in a layout table structured in a relational database comprises:
decomposing the layout information among the target report components into a report layout ID, an ID of the target report component, and the position and the size of the target report component, and correspondingly storing the report layout ID, the ID of the target report component, and the position and the size of the target report component into the layout table;
storing the associated information of the target report component to a structured component table in the relational database, including:
and resolving the associated information of the target report component into the ID of the target report component, the attribute and the attribute value of the target report component, and correspondingly storing the ID, the attribute and the attribute value into the component table.
7. The method according to claim 6, wherein the report send request or report preview request includes a report layout ID disassembled from layout information between the target report components;
reading the layout information between the target report components and the associated information of the target report components from the layout table and the component table respectively, including:
reading the ID of the target report component and the position and the size of the target report component from the layout table according to the report layout ID carried by the report sending request or the report preview request;
and reading the attribute and the attribute value of the target report component from the component table according to the ID of the target report component.
8. The method of claim 6, wherein prior to responding to the user's report send request or report preview request, the method further comprises:
responding to the component preview operation of the user, and simulating and storing layout information corresponding to a target report component to be previewed so as to obtain a report layout ID corresponding to the target report component to be previewed;
acquiring layout information corresponding to the target report component to be previewed and associated information of the target report component to be previewed according to the report layout ID corresponding to the target report component to be previewed;
generating a component description file according to the layout information corresponding to the target report component to be previewed and the associated information of the target report component to be previewed;
and rendering the component description file to output a component-level data report containing the target report component to be previewed.
9. The method of claim 8, wherein simulating to store layout information corresponding to a target report component to be previewed in response to the component preview operation of the user to obtain a report layout ID corresponding to the target report component to be previewed comprises:
receiving layout information constructed and sent by a user terminal where the graphical interface is located for the target report component to be previewed;
and disassembling the layout information corresponding to the target report component to be previewed into a report layout ID, the ID of the target report component to be previewed and the position and the size of the target report component to be previewed, and correspondingly storing the report layout ID, the position and the size of the target report component to be previewed into the layout table.
10. A datagram processing apparatus, comprising:
the display module is used for displaying a graphical interface, and the graphical interface comprises a draggable report component and a layout panel, so that a user can lay a target report component on the layout panel;
the acquisition module is used for responding to component configuration operation of the user on the graphical interface and acquiring layout information among the target report components and associated information of the target report components;
the generating module is used for generating a report description file according to the layout information among the target report components and the associated information of the target report components;
and the rendering module is used for rendering the report description file so as to output a data report.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710428838.4A CN107491427A (en) | 2017-06-08 | 2017-06-08 | Data sheet processing method and processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710428838.4A CN107491427A (en) | 2017-06-08 | 2017-06-08 | Data sheet processing method and processing device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107491427A true CN107491427A (en) | 2017-12-19 |
Family
ID=60643341
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710428838.4A Pending CN107491427A (en) | 2017-06-08 | 2017-06-08 | Data sheet processing method and processing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107491427A (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108052676A (en) * | 2017-12-28 | 2018-05-18 | 广东金赋科技股份有限公司 | The collocation method and device of multi-data source data |
CN108062298A (en) * | 2018-01-02 | 2018-05-22 | 武汉斗鱼网络科技有限公司 | Chart data generation method, device and readable storage medium storing program for executing |
CN109145278A (en) * | 2018-09-10 | 2019-01-04 | 深圳市泰洲科技有限公司 | Report form generation method, device, computer equipment and storage medium |
CN109783184A (en) * | 2019-04-15 | 2019-05-21 | 南京孜博汇信息科技有限公司 | User's customizing form generation method |
CN110287472A (en) * | 2019-06-28 | 2019-09-27 | 湖南御家科技有限公司 | Report configuration method, system, equipment and computer readable storage medium |
CN110941657A (en) * | 2019-11-08 | 2020-03-31 | 支付宝(杭州)信息技术有限公司 | Service data processing method and device |
CN111476010A (en) * | 2020-04-03 | 2020-07-31 | 智业软件股份有限公司 | High-flexibility report method and system |
CN112015423A (en) * | 2019-05-30 | 2020-12-01 | 北京奇虎科技有限公司 | Data processing system and method |
CN112199928A (en) * | 2020-10-16 | 2021-01-08 | 深圳无域科技技术有限公司 | Report system based on machine learning and report generation method |
CN112530026A (en) * | 2019-09-17 | 2021-03-19 | 北京国双科技有限公司 | Association method and device of components |
CN112686017A (en) * | 2020-12-29 | 2021-04-20 | 深圳前海微众银行股份有限公司 | Mail report management method, system, device and computer storage medium |
CN113138760A (en) * | 2021-04-29 | 2021-07-20 | 北京百度网讯科技有限公司 | Page generation method and device, electronic equipment and medium |
CN113703886A (en) * | 2021-07-21 | 2021-11-26 | 青岛海尔科技有限公司 | User system behavior monitoring method, system, electronic equipment and storage medium |
WO2022134115A1 (en) * | 2020-12-26 | 2022-06-30 | 京东方科技集团股份有限公司 | Data processing apparatus, method, and electrode device |
CN116383544A (en) * | 2023-06-05 | 2023-07-04 | 北京拓普丰联信息科技股份有限公司 | Webpage report generation method, device, equipment and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090070667A1 (en) * | 2003-09-15 | 2009-03-12 | Pic Web Services, Inc. | Computer systems and methods for platform independent presentation design |
CN101620591A (en) * | 2009-08-12 | 2010-01-06 | 国网电力科学研究院 | Method for designing module report form layout based on cell mode |
CN104281447A (en) * | 2014-09-01 | 2015-01-14 | 国家电网公司 | Report form fast generating and issuing system and method |
CN104636393A (en) * | 2013-11-13 | 2015-05-20 | 航天信息股份有限公司 | Self-adaptation report form establishing method based on user self-definition behavior analysis |
CN106528514A (en) * | 2016-10-31 | 2017-03-22 | 山东鲁能软件技术有限公司 | Report generation system and method |
-
2017
- 2017-06-08 CN CN201710428838.4A patent/CN107491427A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090070667A1 (en) * | 2003-09-15 | 2009-03-12 | Pic Web Services, Inc. | Computer systems and methods for platform independent presentation design |
CN101620591A (en) * | 2009-08-12 | 2010-01-06 | 国网电力科学研究院 | Method for designing module report form layout based on cell mode |
CN104636393A (en) * | 2013-11-13 | 2015-05-20 | 航天信息股份有限公司 | Self-adaptation report form establishing method based on user self-definition behavior analysis |
CN104281447A (en) * | 2014-09-01 | 2015-01-14 | 国家电网公司 | Report form fast generating and issuing system and method |
CN106528514A (en) * | 2016-10-31 | 2017-03-22 | 山东鲁能软件技术有限公司 | Report generation system and method |
Cited By (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108052676A (en) * | 2017-12-28 | 2018-05-18 | 广东金赋科技股份有限公司 | The collocation method and device of multi-data source data |
CN108052676B (en) * | 2017-12-28 | 2021-06-18 | 广东金赋科技股份有限公司 | Configuration method and device for data of multiple data sources |
CN108062298A (en) * | 2018-01-02 | 2018-05-22 | 武汉斗鱼网络科技有限公司 | Chart data generation method, device and readable storage medium storing program for executing |
CN109145278A (en) * | 2018-09-10 | 2019-01-04 | 深圳市泰洲科技有限公司 | Report form generation method, device, computer equipment and storage medium |
CN109783184A (en) * | 2019-04-15 | 2019-05-21 | 南京孜博汇信息科技有限公司 | User's customizing form generation method |
CN109783184B (en) * | 2019-04-15 | 2019-07-19 | 南京孜博汇信息科技有限公司 | User's customizing form generation method |
CN112015423A (en) * | 2019-05-30 | 2020-12-01 | 北京奇虎科技有限公司 | Data processing system and method |
CN110287472A (en) * | 2019-06-28 | 2019-09-27 | 湖南御家科技有限公司 | Report configuration method, system, equipment and computer readable storage medium |
CN110287472B (en) * | 2019-06-28 | 2022-12-09 | 湖南水羊科技有限公司 | Report configuration method, system, equipment and computer readable storage medium |
CN112530026A (en) * | 2019-09-17 | 2021-03-19 | 北京国双科技有限公司 | Association method and device of components |
CN110941657A (en) * | 2019-11-08 | 2020-03-31 | 支付宝(杭州)信息技术有限公司 | Service data processing method and device |
CN110941657B (en) * | 2019-11-08 | 2023-03-31 | 支付宝(杭州)信息技术有限公司 | Service data processing method and device |
CN111476010A (en) * | 2020-04-03 | 2020-07-31 | 智业软件股份有限公司 | High-flexibility report method and system |
CN112199928A (en) * | 2020-10-16 | 2021-01-08 | 深圳无域科技技术有限公司 | Report system based on machine learning and report generation method |
US11908049B2 (en) | 2020-12-26 | 2024-02-20 | Beijing Zhongxiangying Technology Co., Ltd. | Data processing device and method, electronic apparatus for data visualization |
WO2022134115A1 (en) * | 2020-12-26 | 2022-06-30 | 京东方科技集团股份有限公司 | Data processing apparatus, method, and electrode device |
CN112686017A (en) * | 2020-12-29 | 2021-04-20 | 深圳前海微众银行股份有限公司 | Mail report management method, system, device and computer storage medium |
CN112686017B (en) * | 2020-12-29 | 2024-08-09 | 深圳前海微众银行股份有限公司 | Mail report management method, system, equipment and computer storage medium |
CN113138760A (en) * | 2021-04-29 | 2021-07-20 | 北京百度网讯科技有限公司 | Page generation method and device, electronic equipment and medium |
CN113138760B (en) * | 2021-04-29 | 2024-03-12 | 北京百度网讯科技有限公司 | Page generation method and device, electronic equipment and medium |
CN113703886A (en) * | 2021-07-21 | 2021-11-26 | 青岛海尔科技有限公司 | User system behavior monitoring method, system, electronic equipment and storage medium |
CN113703886B (en) * | 2021-07-21 | 2023-06-20 | 青岛海尔科技有限公司 | User system behavior monitoring method, system, electronic equipment and storage medium |
CN116383544B (en) * | 2023-06-05 | 2023-08-25 | 北京拓普丰联信息科技股份有限公司 | Webpage report generation method, device, equipment and medium |
CN116383544A (en) * | 2023-06-05 | 2023-07-04 | 北京拓普丰联信息科技股份有限公司 | Webpage report generation method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107491427A (en) | Data sheet processing method and processing device | |
JP7420861B2 (en) | System and method for website building system server | |
JP7354294B2 (en) | System and method for providing responsive editing and display integrating hierarchical fluid components and dynamic layout | |
CN111475163B (en) | Method, device and equipment for generating code file of view template and storage medium | |
CN106708480B (en) | Management platform implementation method and device | |
CN109614424B (en) | Page layout generation method, device, computing equipment and medium | |
CN109408764B (en) | Page area dividing method, device, computing equipment and medium | |
US11475097B1 (en) | Simplified website creation, configuration, and customization system | |
US20040237040A1 (en) | System and method of processing an electronic form using layered aspects | |
US20040237030A1 (en) | System and method of implementing calculation fields in an electronic form | |
CN111444696B (en) | Report form display and editing method and device | |
CN110705237B (en) | Automatic document generation method, data processing device and storage medium | |
CN114035773A (en) | Configuration-based low-code form development method, system and device | |
CN102360296A (en) | WEB-based online form development tool | |
CN115712413B (en) | Low code development method, device, equipment and storage medium | |
US20130117656A1 (en) | Conversion of web template designs | |
US8732615B2 (en) | Unified interface for display and modification of data arrays | |
US11868598B2 (en) | Generating and modifying content using data structures | |
KR102230729B1 (en) | An online task system for an Excel file based on templates | |
CN113535165A (en) | Interface generation method and device, electronic equipment and computer readable storage medium | |
CN115982266A (en) | Page dynamic rendering method and system based on custom configuration attribute field | |
KR102490941B1 (en) | An online report creation system using Excel tool | |
CN115543288A (en) | Code information generation method, device, equipment and storage medium | |
CN111858595B (en) | Dynamic configuration method and system for electric power engineering examination record table | |
CN110928540A (en) | Page generation method and device |
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: Building N3, building 12, No. 27, Chengzhong Road, Jiancai, Haidian District, Beijing 100096 Applicant after: Beijing Xingxuan Technology Co.,Ltd. Address before: Room 202, 2 floors, 1-3 floors, No. 11 Shangdi Information Road, Haidian District, Beijing 100085 Applicant before: Beijing Xiaodu Information Technology Co.,Ltd. |
|
CB02 | Change of applicant information | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171219 |
|
RJ01 | Rejection of invention patent application after publication |