Fields resultFields = dataDefController.getDataDefinition().getResultFields(); Field sortField = (Field)resultFields.findField("{CUSTOMER.COUNTRY}", FieldDisplayNameType.formulaName, java.util.Locale.ENGLISH);
groupSortController.modify(oldSort, newSort);
void modifyGroupSort(ReportClientDocument rcd) throws ReportSDKException { DataDefController dataDefController = rcd.getDataDefController(); Fields resultFields = dataDefController.getDataDefinition().getResultFields(); Field sortField = (Field)resultFields.findField("{CUSTOMER.COUNTRY}", FieldDisplayNameType.formulaName, java.util.Locale.ENGLISH); GroupSortController gsc = dataDefController.getGroupSortController(); ISort oldSort = gsc.findSort(sortField); if (gsc.canSortOn(sortField)) { ISort newSort = new Sort(); newSort.setSortField(sortField); newSort.setDirection(SortDirection.descendingOrder); gsc.modify(oldSort, newSort); } }
Business Objects, an SAP company http://www.businessobjects.com/ Support services http://www.businessobjects.com/services/support/ Product Documentation on the Web http://support.businessobjects.com/documentation/ |