// Excerpted from the Hao Chen Forum to get the data window data: # Get the data dwcontrol.object.columnnname {.Buffer} {.DataSource} {[rownum]} in knowing the column or calculating the domain name. Two options, current (default), and ORIGINAL, where we can specify whether the data is obtained from the current data window or from the database. For the calculation domain, it cannot be changed or there is no current value, so we must specify that this parameter is ORIGINAL.
1. Write the data window to the data dw_1.object.em_name [1] = 'China PB Learning Center' 2, get data from the data window to put the data in the current data window in the array in the array: l_dataWindow [] = dw_1 .Object.em_name.current The following statement gets the initial value of EMP_NAME in the FILTER buffer (value in the database) string ls_nameArray [] ls_nameArray = dw_1.object.emp_name.filter.original get the value of the selected item: dwcontrol.object: dwcontrol.object .COLumnNAME {.primary} {. DataSource} .selected The following statement can get the initial value of the EMP_NAME column (from the value detected from the database), and put it into a string number string ls_nameArray [] LS_NameArRay = dw_1 .Object.emp_name.original.selected Get a range of values to return a range of rows of rows of rows that specify columns, put them in array express: dwcontrol.object.columnname {.buffer} {.datasource} [Startrownum, Endrownum Example: Since the primary buffer and the current data are default options, the following statement equivalent DW_1.Object.emp_name [11,20] dw_1.object.emp_name.primary [11,20] dw_1.object.emp_name. Current [11,20] dw_1.object.emp_name.primary.current [11,20] The following statement sets the EMP_NAME column from 11 rows to 20 rows to empty strings String ls_empty [] ls_empty [1] = "" DW_1 .Object.emp_name [11, 20] = & {",", ",", ",", ",", ",", ") get the initial EMP_NAME column Value, and put them in a string array string ls_nameArray [] ls_nameArray = dw_1.object.emp_name.original [11,20] The following statement gets the current value column of the filter buffer from 5 lines to 8 lines, and And put them in an array String Ls_nameArray [] ls_nameArray = dw_1.object.emp_name.filter [5,8] The following statement gets the EMP_NAME list in the filter buffer from the initial value from the 5 line to 8 lines, and puts them in In the array string ls_nameArray [] ls_nameArray = dw_1.object.emp_name.filter.original [5,8] The following statement gets the emp_name column to the current value of the buffer from 50 rows to 200 rows, and put them in an array String ls_nameArray [] ls_nameArray = dw_1.object.emp_name.delete [50,200] The following statement gets the EMP_NAME column listing the initial value of the buffer from 50 rows to 200 rows, and puts them in an array String ls_nameArray [] ls_nameArray = dw_1 .Object.emp_name.delete.original [50, 200]
2) Get a value of the known list column to the value of the specified line number column number: dwcontrol.object.data {.buffer} {.data {.buffer} {.dataSource} [rownum, colnum] example: Due to the primary buffer, the current value option is By default, the following statement is equivalent, it is to get the first line, the second column of data dw_1.object.data [1, 2] dw_1.object.data.primary.current [1, 2] below The first value of the FILTER buffer is first, the value of the second column is changed to 0DW_1.Object.data.filter.original [1, 2] = 0 Get a certain range of rows of data expressions: dwcontrol.object.data {.buffer} {.datasource} [Startrownum, startColnum, endrownum, endcolnum] example: Since the primary buffer and the current value option are default, the following statement is equivalent, it is to get the first line to the 10th line. The value of the first column to the fourth column dw_1.object.data [1, 1, 10, 4] dw_1.object.data.primary.current [1, 1, 10, 4] The following statement gets Employee IDS and Last Names The values of all rows listed in the Delete buffer are the first second columns. The resulting data is placed in a structure called Str_NameList, which has two properties, shaped ID and character string LastName. IDS and Names are stored in file deleted.txt.
integer li_fileNumlong ll_deletedrowsstr_namelist lstr_namelist [] ll_deletedrows = dw_1.DeletedCount () lstr_namelist = & dw_1.Object.Data.Delete [1,1, ll_deletedrows, 2] li_fileNum = FileOpen ( "C: /HR/DELETED.TXT", & LineMode !, Write !) FOR ll_count = 1 to UpperBound (lstr_namelist) FileWrite (li_fileNum, & String (lstr_namelist.id) & "" & lstr_namelist.lastname & "~ r ~ n") NEXTFileClose (li_fileNum) the following statement that the Ids and last names data column is NULLlong ll_nstr_namelist lstr_namelist [] SetNull (lstr_namelist [1] .id) SetNull (lstr_namelist [1] .lastname) fOR ll_n = 2 to dw_1.RowCount () lstr_namelist [ll_n] = lstr_namelist [1] NEXTdw_1.Object. Data [1,1, dw_1.rowcount (), 2] = lstr_data 3) Get a data expression on a row or all rows on the data window: dwcontrol.object.data {.buffer} {.dataSource} {[ROWNUM]} Sample: Since the primary buffer and the current value option are default, the following statement is equivalent, it is obtained by the current data of the PRIMARY buffer fifth line DW_1.Object.data [5] dw_1.object .Data.primary.current [5] The following statement puts the current value of the data window PRIMARY buffer into a structural array. Any la_dwdata_dwdata = dw_1.object.data below the current value of the DELETE buffer below, and put it Put into a structure array any la_dwdata_dwdata = dw_1.object.data.de LeeTe The following statement covered the data of the second row of the nesting report with the current value of the PRIMARY buffer of DW_2, and the columns in Data Window DW_2 must be the same as columns in the nested report: dw_1.object.nestrep [2] .Object.data = dw_2.object.data Get the data expression of the selected row: dwcontrol.object.data {.primary} {.data {.primary} {.dataSource} .selected example: Due to the primary buffer and the current value option, below The equivalent of the statement is to get the data dwedDW_1.Data.selectedDW_1.Object.data.primary.selectedDW_1.Object.data.current.data.primary.current.selected The following statement is obtained The initial value of the line dw_1.object.data.original.selectedDw_1.object.data.primary.original.selected The following statement gets the current value of the PRIMARY buffer in DW_2,