Friday, July 30, 2010

PB How to get Crosstab column name


---- PowerBuilder was recognized by all, the best database front-end development tools, its unique, that is, the data window (DataWindow). It is the flexibility to organize the various data in the database, the user can use a simple query window can be a rich query results, and can be programmed on the query result set, all users come to the desired end result. If able to skillfully use the patented DataWindow technology developers and users will no doubt bring great convenience.
---- Crosstab is a kind of window data for statistical analysis of the data show style, the meaning of the Cross Tabulation, or horizontal tab. That it can retrieve data classification or grouping, to sum or average aggregate operation, etc., preparation of statistical tables.
---- However, developers using Crosstab data window will encounter a problem: If the developers want them out when processing the content, which can not be general method Crosstab column name, so that the operation can not run . This is because: Crosstab data window defined in the ranks of the data is different from the other window, and its columns are changing. So to get Crosstab column name must be used in other ways.
---- The following paragraph of a wage statistics of the number of statistics by gender were Crosstab DataWindow style as an example of the static obtained Crosstab column name.
---- 1, select the display style, define the data source, select the table "auths" columns "author_code", "salary" and "sex"; with the mouse to drag the Source Data list box of "sex" column to Columns list box, so that "sex" out into the longitudinal statistical data window column; use the mouse to drag the Source Data list box of "salary" column to the Rows list box, so that "salary" column as the horizontal statistics out the window of data , the salary to int (salary/100) * 100; with the mouse to drag the Source Data list box of "author_code" column to the list box to "count (author_code for Crosstab)" listed as the statistical value of the data window, At this point "CrossTab Definition" dialog box shown below: (Figure omitted)
---- 2, click the OK button, the data window as follows: (figure omitted)
---- 3, Crosstab DataWindow column names
---- Crosstab display style with static and dynamic. If using a static style, in the "CrossTab Definition" dialog box, uncheck the "Rebuild columns at runtime" checkbox. DataWindow column names in the Detail column, there are certain rules to follow:
---- The first column of the column birthright two situations: one, "CrossTab Definition" dialog box the selected Rows of columns named in the table fields, such as the Rows = salary is the first column of the listing as "salary"; two, such as "CrossTab Definition" dialog box the selected Rows of columns called computational expressions, such as int (salary/100) * 100, the first column of the column names are "row_column" .
---- The remaining columns were selected Value column names are arranged, such as the Value for the author_Code, then each column in turn "author_Code", "author_code_1", "author_code_2", ... ... the number of columns in the Columns are based on the selected The number can be generated, such as Columns = sex, only two columns "author_Code", "author_code_1";
---- The last column of the column named "grand_count_" + selected Value name, as in this case, "grand_count_author_code". Such as dynamic style in the "CrossTab Definition" dialog box, select the "Rebuild columns at runtime" checkbox. DataWindow column names in the Detail column: (Figure omitted) the first column and last column of column names similar to the static style described the situation, and not have a similar. The middle column of the listing of all the static style of a different situation, followed by the selected column names are arranged rows, such as the rows for the "salary", in this case, the columns were "salary", "salary_1";
---- So, the problem is welcome tough and understanding. In the Crosstab column names are also able to freely after the ranks of which the content processing. Through the above description, the reader can actually feel the computer is not easy to implement many of the functions, as long as the proper analysis, to digest, more tests several times, generally still able to find effective solutions.




Recommended links:



Gateway Bank of China has become the odds



To time TO modify unix password script, to prevent brute force



"Mirrors Edge" Cheats



format blackberry



Considerate: Foxmail 6.0 beta 3 the beginning of EXPERIENCE



Evaluate Animation Tools



mkv video format



Hot Browsers



Converting Mp3 To Aac



Who made the prosperity of reduced memory Zhongguancun



Special steps: maneuvers, decisive miles



Gateway Bank of China has become the odds



converter avi TO 3gp



Northwest Park Shanghai twists and Turns



New worm Floodnet (cute) little files



Evaluate Components And Libraries



No comments:

Post a Comment