31.07.2021, 02:27 | #1 |
Участник
|
a33ik: MultiSelect lookup in a SSRS report with BaseEnum
Источник: http://daxonline.org/1722-multiselec...-baseenum.html
============== AX2012r3 SSRS Report DataContract class: class Declaration: [ DataContractAttribute, SysOperationContractProcessingAttribute(classstr(ENUMReportUIBuilder))]class ENUMReportDataContract implements SysOperationValidatable{ List ENUMTypeList;} add parm method: [ DataMemberAttribute('ENUMTypeList'), SysOperationDisplayOrderAttribute('1'), AifCollectionTypeAttribute('ENUMTypeList', Types::Enum, enumStr(ENUMType)), SysOperationLabelAttribute(literalstr("ENUM Label")) ] public List parmENUMTypeList(List _ENUMTypeList = ENUMTypeList) { ENUMTypeList = _ENUMTypeList; return ENUMTypeList;} UIBuilder class: Class Declaration: class ENUMReportUIBuilder extends SrsReportDataContractUIBuilder{ DialogField dfENUMType;} override methods: public void postRun() { super(); dfENUMType= this.bindInfo().getDialogField(this.dataContractObject(), methodStr(ReportDataContract, parmENUMTypeList));} public void getFromDialog() {#SRSFramework ENUMReportDataContract contract = this.dataContractObject() as ENUMReportDataContract; str enumStrValue; List strSplitList; List retList = new List(Types::Enum); ListEnumerator strSplitEnumerator; ENUMType ENUMTypeVar; super(); strSplitList = strSplit(dfENUMType.value(), #CollectionValueSeparator); strSplitEnumerator = strSplitList.getEnumerator(); while(strSplitEnumerator.moveNext()) { enumStrValue = strSplitEnumerator.current(); ENUMTypeVar = str2enum(ENUMTypeVar, enumStrValue); if (enum2str(ENUMTypeVar)) { retList.addEnd(ENUMTypeVar); } } contract.parmENUMTypeList(retList);} Источник: http://daxonline.org/1722-multiselec...-baseenum.html |
|
|
|