Skip to main content

Posts

Showing posts with the label Lookup Method for Dimension fields for UI Builder class in Axapta SSRS

Add Lookup Method for Dimension fields for UI Builder class in Axapta SSRS

To Add Lookup Method for Dimension fields like division ,branch etc using UI Builder class in Axapta SSRS Report you can refer below code. #define.DimensionName("Branch") Query query; QueryBuildDataSource qbds,qbds1; SysTableLookup sysTableLookup; DimensionAttribute dimAttr; ; dimAttr = DimensionAttribute::findByName(#DimensionName); sysTableLookup = SysTableLookup::newParameters(tablenum(OMOperatingUnit),branchCodeLookup); sysTableLookup.addLookupfield(fieldnum(OMOperatingUnit, OmoperatingunitNumber)); sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit,Name)); query = new Query(); qbds = query.addDataSource(tableNum(OMOperatingUnit)); qbds.addRange(fieldNum(OMOperatingUnit, OMOperatingUnitType)).value(queryvalue(OMOperatingUnitType::OMBusinessUnit)); sysTableLookup.parmQuery(query); sysTableLookup.parmUseLookupValue(False); sysTableLookup.performFormLookup(); Division dime...