ReportControl_GetMatrixΒΆ

ReportControl_GetMatrix converts the DialogBox return value for the report control into a matrix.

smMatrix = ReportControl_GetMatrix(ssRet)
<smMatrix, smSel> = ReportControl_GetMatrix(ssRet)
<smMatrix, smSel, rvSelRow> = ReportControl_GetMatrix(ssRet)

Return Value

smMatrix is a string matrix. smSel is a string matrix with the selection. rvSelRow is a vector with indices of the selected rows of smMatrix. If no row is selected, the variable contains the value 0. .. us.params

Parameters

ssRet

ssRet is one of the elements of the return value of DialogBox function.

Example

Example for a callback function which could be invoked when a user clicks on a dialog box button:

def __DataFileList_EditNC(svInit)
{
    <smList, svSel, rsSelRow> = ReportControl_GetMatrix(svInit[1]);

    if (rsSelRow == 0) {
        MessageBoxInfo("Select an element");
        return FALSE;
    }

    ssDir = _MakePathComplete(svSel[2]);
    ssFile = svSel[3];
    ssNCFile = ssDir + ssFile;
    ssNCFile = auto_ImportData(ssNCFile);
    ssNewName = NC_Edit(ssNCFile, 1);
    if (ssNewName != "") {
        svPath = SplitPath(ssNewName);
        smList[rsSelRow; 2] = sum(svPath[1,2]);
        smList[rsSelRow; 3] = sum(svPath[3,4]);
        svInit[1] = ReportControl_GetInit(smList, TRUE, rsSelRow);
    }
    return svInit;
}

History

Version Description
4.2.2 New
5.3.0 New return values added

id-204865