Summary of the invention
For solving the problems of the technologies described above, the embodiment of the present application provides a kind of list data dynamic sequencing method and apparatus, can realize the dynamic order of table data, realizes simply, has improved data-handling efficiency.
Technical scheme is as follows:
The embodiment of the present application discloses a kind of list data dynamic sequencing method, and described method comprises:
Add the first data rows and the second data rows for list, described the first data are set and classify ascending order arrangement as, described the second data are set and classify descending sort as;
Select the benchmark sort field in described list, for described benchmark sort field arranges Transfer Parameters;
Click described benchmark sort field, described Transfer Parameters is passed to the first data rows and the second data rows in described list, show that according to described Transfer Parameters the data of described list are according to the result of described the first data rows or the sequence of the second data rows.
Preferably, described Transfer Parameters comprises sort type parameter and benchmark sequence field parameter.
Preferably, the content of described the first data rows is:
In the time that the value of described sort type parameter is ascending order, determine current base platoon sequence according to described benchmark sequence field parameter, the content of described the first data rows is the content of current base platoon sequence; In the time that the value of described sort type parameter is descending, the content of described the first data rows is empty;
The content of described the second data rows is:
In the time that the value of described sort type parameter is descending, determine current base platoon sequence according to described benchmark sequence field parameter, the content of described the second data rows is the content of current base platoon sequence; In the time that the value of described sort type parameter is ascending order, the content of described the second data rows is empty.
Preferably, described data of showing described list according to described Transfer Parameters according to the result of described the first data rows or the sequence of the second data rows are:
In the time that the value of described sort type parameter is ascending order, show that the data of described list are according to the result of described the first data rows sequence;
In the time that the value of described sort type parameter is descending, show that the data of described list are according to the result of described the second data rows sequence.
Preferably, described method further comprises:
For described benchmark sort field arranges ascending chain head and descending chain head, in the time that the value of described sort type parameter is ascending order, described ascending chain head is set and hides, described descending chain head shows; In the time that the value of described sort type parameter is descending, described descending chain head is set and hides, described ascending chain head shows.
Preferably, described method further comprises:
The display type of described the first data rows and described the second data rows is set to hide.
Preferably, described method further comprises:
For all fields in described list arrange Transfer Parameters.
The embodiment of the present application also discloses a kind of list data dynamic sequencing device, and described device comprises:
Data rows adding device, is used to list to add the first data rows and the second data rows, described the first data is set and classifies ascending order arrangement as, described the second data is set and classifies descending sort as;
Selected cell, for selecting the benchmark sort field of described list, for described benchmark sort field arranges Transfer Parameters;
Sequence display unit, be used for clicking described benchmark sort field, described Transfer Parameters is passed to the first data rows and the second data rows in described list, show that according to described Transfer Parameters the data of described list are according to the result of described the first data rows or the sequence of the second data rows.
Preferably, described data rows adding device comprises the first definition unit and the second definition unit, wherein,
Described the first definition unit is for defining the content of the first data rows: in the time that the value of described sort type parameter is ascending order, determine current base platoon sequence according to described benchmark sequence field parameter, the content of described the first data rows is the content of current base platoon sequence; In the time that the value of described sort type parameter is descending, the content of described the first data rows is empty;
Described the second definition unit is for defining the content of the second data rows: in the time that the value of described sort type parameter is descending, determine current base platoon sequence according to described benchmark sequence field parameter, the content of described the second data rows is the content of current base platoon sequence; In the time that the value of described sort type parameter is ascending order, the content of described the second data rows is empty.
Preferably, described device also comprises:
The first setting unit, for the ascending chain head of described benchmark sort field and the display type of descending chain head are set, in the time that the value of described sort type parameter is ascending order, arranges described ascending chain head and hides, and described descending chain head shows; In the time that the value of described sort type parameter is descending, described descending chain head is set and hides, described ascending chain head shows.
Preferably, described device also comprises:
The second setting unit, is set to hide for the display type of described the first data rows and described the second data rows.
A kind of list data dynamic sequencing method that the embodiment of the present application provides, its beneficial effect that can reach is: the method that the embodiment of the present application provides is by adding the first data rows and the second data rows for list, the first data are set and classify ascending order arrangement as, the second data are set and classify descending sort as; Selection reference sort field, for benchmark sort field arranges Transfer Parameters; Click described benchmark sort field, described Transfer Parameters is passed to the first data rows and the second data rows in described list, like this, determine that according to Transfer Parameters current is to arrange and the title of definite base platoon sequence according to ascending order or descending, like this, in the time clicking benchmark sort field, can realize the data of list and can carry out dynamic order according to the first data rows or the second data rows, solve the technical matters that prior art cannot be carried out to list dynamic lifting sequence.The method that the application provides realizes easily, easy to maintenance, has improved data-handling efficiency.
Embodiment
The embodiment of the present application provides a kind of list data dynamic sequencing method and apparatus, can realize the dynamic order of table data, realizes simply, has improved data-handling efficiency.
In order to make those skilled in the art person understand better the technical scheme in the application, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only the application's part embodiment, rather than whole embodiment.Based on the embodiment in the application, those of ordinary skills are not making the every other embodiment obtaining under creative work prerequisite, all should belong to the scope of the application's protection.
First a kind of list data dynamic sequencing method of the application is described.
Referring to Fig. 1, list data dynamic sequencing method the first embodiment process flow diagram providing for the application.
S101, adds the first data rows and the second data rows for list, described the first data is set and classifies ascending order arrangement as, described the second data is set and classifies descending sort as.
S102, selects the benchmark sort field in described list, for described benchmark sort field arranges Transfer Parameters.
S103, clicks described benchmark sort field, and described Transfer Parameters is passed to the first data rows and the second data rows in described list, shows that the data of described list are according to the result of described the first data rows or the sequence of the second data rows according to described Transfer Parameters.
Referring to Fig. 2, list dynamic order method the second embodiment process flow diagram providing for the application.
S201, the content of definition data item.
In the second embodiment providing in the application, describe as an example of list A example.Suppose that the list that need to sort is as shown in table 1:
Table 1 list A
Time |
Organization name |
Wage |
2004 |
Unit 1 |
6230.8 |
2006 |
Unit 1 |
84067.52 |
2005 |
Unit 1 |
86197.73 |
2006 |
Unit 2 |
65211.67 |
2005 |
Unit 2 |
90810.96 |
2004 |
Unit 2 |
20145.83 |
Suppose that we will sort to classifying year, organization name, three fields of wage as, first define the content of data item.In the embodiment providing in the application, described data item comprises the first data rows and the second data rows, and described data item can also comprise sort type data item, benchmark sequence field name data item.Wherein, sort type data item is the standard that ascending order operation or descending operation are carried out in judgement.Concrete, two sort type data item can be set, called after UP and DOWN respectively, its content be respectively character string ' UP ' and ' DOWN '.Benchmark sequence field name data item is used for recording the title of base platoon's sequence, such as COL-A, COL-B, COL-C represent respectively year, organization name and wage three row fields.
Concrete, described the first data rows content-defined as follows:
When according to ascending sort, when the value of sort type parameter is ascending order, determine current base platoon sequence according to benchmark sequence field parameter, the content of described the first data rows is the content of current base platoon sequence; When according to descending sort, when the value of sort type parameter is descending, the content of described the first data rows is empty.
Concrete, the content of described the second data rows is:
When according to descending sort, when the value of sort type parameter is descending, determine current base platoon sequence according to described benchmark sequence field parameter, the content of described the second data rows is the content of current base platoon sequence; When according to ascending sort,, in the time that the value of sort type parameter is ascending order, the content of described the second data rows is empty.
Concrete, the content of the first data rows can define as shown in table 2:
The content of table 2 the first data rows
Implication defined above is: if according to ascending sort, determine current base platoon sequence by sortcolumn parameter, the content of the first data item is consistent with the content of current base platoon sequence; If according to descending sort, the content of this first data rows is empty.
Concrete, the content of the second data rows can define as shown in table 3:
The content of table 3 the second data rows
Implication defined above is: if according to descending sort, determine current base platoon sequence by sortcolumn parameter, the content of the second data rows is consistent with the content of current base platoon sequence.If according to descending sort, the content of the second data rows is empty.
S202, adds the first data rows and the second data rows for list, described the first data is set and classifies ascending order arrangement as, described the second data is set and classifies descending sort as.
Concrete, the first data rows and the second data rows are added in list.When specific implementation, click the data item tab of insertable object, choose the first data rows, added to the last of list; Choose the with data rows row, the first data are set and classify ascending order as and arrange.Same, the second data rows is added in list, it is set for descending sort.
In the time that needs are arranged according to ascending order, what play a decisive role is the data of the first data rows like this, because the content of the second data rows is empty, specifically as shown in table 4:
Table 4 list A ascending order is arranged
While in like manner needing descending sort, what play a decisive role is the data of the second data rows, because the content of the first data rows is empty.Specifically as shown in table 5:
Table 5 list A descending sort
S203, selects the benchmark sort field in described list, for described benchmark sort field arranges Transfer Parameters.
In the embodiment of the present application, benchmark sort field is that list is according to that column data of which row sequence.For example, we want list to sort according to the time, and the time field in selective listing is as benchmark sort field, for it arranges Transfer Parameters.
When specific implementation, we can use the tracing function in report tool.First review for the benchmark sort field in list arranges ascending order, choose the benchmark sort field time, for it arranges Transfer Parameters.To review called after UP, target form is form self.Click parameter arranges, and for transmitting, transmission value is set.Described Transfer Parameters comprises sort type parameter (sorttype) and benchmark sequence field parameter (sortcolumn).Method row are set to transmit data item occurrence, and the value that then benchmark sequence field parameter sortcolumn is set is that the value of data item COL-A (representing the time) is A, and the value of sort type parameter s orttype is that the value of data item UP is UP.After setting completes, the benchmark sort field time will become hyperlink pattern.Like this, benchmark sort field and the first data rows or the second data rows have just been set up incidence relation.
Below, for arranging descending, reviews the benchmark sort field in list.Choose the time, the reproduction button on click tools hurdle, and then click paste button, to review and copy portion, revise the duplicated attribute of reviewing, will review RNTO DOWN, and the transmission value of sort type parameter s orttype is set to the value " DOWN " of data item DOWN.
S204, clicks described benchmark sort field, and described Transfer Parameters is passed to the first data rows and the second data rows in described list, shows that the data of described list are according to the result of described the first data rows or the sequence of the second data rows according to described Transfer Parameters.
Concrete, show that according to described Transfer Parameters the data of described list are specially according to the result of described the first data rows or the sequence of the second data rows:
In the time that the value of described sort type parameter is ascending order, show that the data of described list are according to the result of described the first data rows sequence;
In the time that the value of described sort type parameter is descending, show that the data of described list are according to the result of described the second data rows sequence.
Specific to the embodiment of the present application, by the setting in step S203, click ascending order while reviewing (while clicking the benchmark sort field time) transmitted sortcolumn=A and these two filterconditions of sorttype=UP for form, the content that can judge the first data rows in conjunction with the definition of the first data rows and the second data rows is the content in base platoon's sequence time, and the content of the second data rows is empty.
When click descending is reviewed, for form has transmitted sortcolumn=A and these two filterconditions of sorttype=DOWN, can judge the content of the first data rows in conjunction with the definition of the first data rows and the second data rows for empty, the content of the second data rows is the content in base platoon's sequence time.
Operation form, can see that it is all hyperlink form that year column gauge outfit has 2 times, clicks the previous time, is that ascending order is arranged, descending sort while clicking a rear sequence.Concrete, data in list are that full line moves in the time of sequence, therefore in the time clicking first time, ascending order UP owing to being provided with the value of sort type parameter for it, the value of benchmark sequence field parameter is A (being the time), so just Transfer Parameters has been passed to the first data rows and the second data rows in list; Due to being set in step S202, the first data classify ascending order arrangement as, at this moment, the first data rows plays a decisive role in sequence, in the time that the first data rows is arranged according to ascending order, data full line in list moves, and has therefore realized all data in list and carry out according to the first data rows the result of dynamic order.According to the definition of the first data rows and the second data rows, the content of the first data rows is the content of base platoon's sequence, has therefore in fact realized list according to the effect of benchmark sort field dynamic order.
S205, for all fields in list arrange Transfer Parameters.
The organization name and the wage that are respectively in the same way in list arrange Transfer Parameters.
Further, the method that the embodiment of the present application provides can also comprise:
S206, for described benchmark sort field arranges ascending chain head and descending chain head, in the time that the value of described sort type parameter is ascending order, arranges described ascending chain head and hides, and described descending chain head shows; In the time that the value of described sort type parameter is descending, described descending chain head is set and hides, described ascending chain head shows.
Only see exercisable row in order to ensure user, can ascending chain head and descending chain head be set for base platoon's order field, below take the time as example.Choose the corresponding time of ascending order in list, arrange.Choose the time that in list, descending is corresponding to arrange.By above-mentioned setting, in the time that Transfer Parameters sorttype parameter value is UP, representing current is ascending order operation, and in year column, ascending order gauge outfit is invisible, represents that the descending gauge outfit of descending is visible; In the time that Transfer Parameters sorttype parameter value is DOWN, representing current is descending operation, and in year column, ascending order gauge outfit is visible, represents that the descending gauge outfit of descending is invisible.
Preferably, in the time that list acquiescence does not sort, what list gauge outfit showed is ascending order gauge outfit.
Further, the method that the application provides can also comprise:
S207, the display type of described the first data rows and described the second data rows is set to hide.
Succinct for overall interface, can the first data rows and the gauge outfit of the second data rows and the display type of content be set to hide, like this, while again moving form, can't see the first data rows and the second data rows.
In the embodiment providing in the application, by add the first data rows and the second data rows for list, for benchmark sort field arranges Transfer Parameters, in the time clicking benchmark sort field, Transfer Parameters is passed to the first data rows and second data rows of form; In the time that the value of the sort type parameter of transmitting is ascending order UP, the first data rows plays a decisive role, and displaying result is that the data in list are carried out ascending sort according to the first data rows; In the time that the value of the sort type parameter of transmitting is descending DOWN, the second data rows plays a decisive role, and displaying result is that the data in list are carried out descending sort according to the second data rows.Like this, realize the data in list and carried out dynamic order, realized simply, improved data-handling efficiency.
The embodiment of the present application also discloses a kind of list data dynamic sequencing device.
Referring to Fig. 3, it is the embodiment of the present application list data dynamic sequencing device schematic diagram.
Described device comprises:
Data rows adding device 301, is used to list to add the first data rows and the second data rows, described the first data is set and classifies ascending order arrangement as, described the second data is set and classifies descending sort as;
Selected cell 302, for selecting the benchmark sort field of described list, for described benchmark sort field arranges Transfer Parameters;
Sequence display unit 303, be used for clicking described benchmark sort field, described Transfer Parameters is passed to the first data rows and the second data rows in described list, show that according to described Transfer Parameters the data of described list are according to the result of described the first data rows or the sequence of the second data rows.
Preferably, described data rows adding device comprises the first definition unit and the second definition unit, wherein,
Described the first definition unit is for defining the content of the first data rows: in the time that the value of described sort type parameter is ascending order, determine current base platoon sequence according to described benchmark sequence field parameter, the content of described the first data rows is the content of current base platoon sequence; In the time that the value of described sort type parameter is descending, the content of described the first data rows is empty.
Described the second definition unit is for defining the content of the second data rows: in the time that the value of described sort type parameter is descending, determine current base platoon sequence according to described benchmark sequence field parameter, the content of described the second data rows is the content of current base platoon sequence; In the time that the value of described sort type parameter is ascending order, the content of described the second data rows is empty.
Concrete, described selected cell 302 specifically comprises:
The first selected cell, for selection reference sort field, for described benchmark sort field arranges ascending chain head, for ascending chain head arranges Transfer Parameters, described Transfer Parameters comprises sort type parameter and benchmark sequence field parameter, the value of sort type parameter is set to ascending order, and the sort value of field parameter of benchmark is set to the value of benchmark sort field.
The second selected cell, for selection reference sort field, for described benchmark sort field arranges descending chain head, for descending chain head arranges Transfer Parameters, described Transfer Parameters comprises sort type parameter and benchmark sequence field parameter, the value of sort type parameter is set to descending, and the sort value of field parameter of benchmark is set to the value of benchmark sort field.
Further, described device also comprises:
The first setting unit, for the ascending chain head of described benchmark sort field and the display type of descending chain head are set, in the time that the value of described sort type parameter is ascending order, arranges described ascending chain head and hides, and described descending chain head shows; In the time that the value of described sort type parameter is descending, described descending chain head is set and hides, described ascending chain head shows.
Further, described device also comprises:
The second setting unit, is set to hide for the display type of described the first data rows and described the second data rows.
The application can describe in the general context of the computer executable instructions of being carried out by computing machine, for example program module.Usually, program module comprises and carries out particular task or realize routine, program, object, assembly, data structure of particular abstract data type etc.Also can in distributed computing environment, put into practice the application, in these distributed computing environment, be executed the task by the teleprocessing equipment being connected by communication network.In distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium including memory device.
The above is only the application's embodiment; it should be pointed out that for those skilled in the art, do not departing under the prerequisite of the application's principle; can also make some improvements and modifications, these improvements and modifications also should be considered as the application's protection domain.