Making fixed format reporting table

In previous articles, we learned to make various types of completing the table, have a certain understanding of the reporting mechanisms Run Dry statements. Today we look at how to create a fixed format reporting table, whether the learning content prior to inspection at the same time that they have mastered.

Today, to learn the effect of fixed format reporting table shown in FIG follows:

imagepng

    The left fixed content, the blue part of the customer is required to fill in the content, and finally the entire page will be updated data into a database table.

The difficulty here is that the left-hand fixing how content is also updated to the database, is how to set the cell partitions.

With this issue we look at the specific implementation steps:

The first step in completing the new table

Completing the table of contents and edit the styles, as shown below:

imagepng

Such reports are generally corresponds to the effect of a excel file, we can use the "File" - "open reporting" - select the corresponding excel file, import excel to slight modifications after the report design page.

The second step of data processing

Usually the script processing section related and business needs, this example need to select different data depending on the presentation parameter values ​​and dynamically update the data according to the parameter values.

Source script content as shown below:

imagepng

    Here the main use and query functions if function, if the function for determining dynamic conditions, query the number of dynamic taken.

Wherein, A2: using the function to determine if the parameter value is 0 tbType

      B3: if the condition is satisfied when, in accordance with the query function fetch the sql

B5: When the condition is not satisfied if, according to a further query function access sql

The whereabouts of the content script shown below:

imagepng

   Script configuration figure is very familiar with, there are wood? Yes, we talked about the content of this front is dynamically updated.

among them,

A2: using the function to determine if the parameter value is 0 tbType

B3: When the condition is satisfied, updating of the insert to achieve YJKFFYQKGJB table data update function, i.e., inserting data into yffy object table YJKFFYQKGJB

B4: When the condition is not satisfied, updating of modification achieved by YJKFFYQKGJB data table update function

I.e., the difference data yffy modify objects and yffy_old object to the table YJKFFYQKGJB

A6: Gets the exception process information database operations

A7: If A6 acquired abnormality information is empty, then submit warehousing, otherwise perform transaction rollback

Step configured cell property

imagepng

We make the following settings in the first step on the basis of:

1) the user can fill in data cell to a numeric format: Amount headquarters and subordinate enterprises where the columns where the cells of the column summary

      Summary and development funding situation amounts also set to a value grid, to facilitate identification data object field

2) the automatic calculation expression is provided: the calculation of the required cell configuration summing sum the expression

      For example: sum (C5: C9) indicates finding C5 to C9 cells and all data

3) "R & D funding situation" corresponds to Chinese name, the database need to store the ID column, so we need to insert one, corresponding to the ID and write

4) add the ID column is set to the grid dimension, the Chinese name column is set to the value cell, and the field name of each line configuration, to ensure proper fill partition.

imagepng

to sum up:

Thus, a simple fixed format reporting table on the production is complete. Realize the difficulty here is that the report cell partition settings, or how not to do? It disk, the disk more, you will find a variety of stunning set at the time of data processing calculator script.

More complete the relevant questions, please see: complete the relevant question Category Navigation

Guess you like

Origin www.cnblogs.com/zozoxxma/p/11880313.html