class SampleReportUIBuilder extends SrsReportDataContractUIBuilder
{
private DialogField vendordf,dialogbranch;
SampleReportContract contract;
}
public void postBuild()
{
super();
contract = this.dataContractObject();
// binding dialogs with contract fields
vendordf = this.bindInfo().getDialogField(this.dataContractObject(),
methodStr(SampleReportContract, parmFinDimProject));
//dialogbranch = this.bindInfo().getDialogField(this.dataContractObject(),
// methodStr(SampleReportContract, parmOMOperatingUnitNumber));
//dialogbranch.registerOverrideMethod(methodStr(FormStringControl,lookup),methodStr(BEHCMReviewUIBuilder,divisionCodeLookup),this);
vendordf.registerOverrideMethod(methodStr(FormStringControl,lookup),methodStr(SampleReportUIBuilder,PerfPeriodIdLookup),this);
}
/*
private void PerfPeriodIdLookup(FormStringControl divisionCodeLookup)
{
Query query = new Query();
QueryBuildDataSource qbd, qbdPerson;
QueryBuildDataSource qbds;
QueryBuildDataSource qbdsJoin;
QueryBuildRange qbr;
SysTableLookup sysTableLookup = sysTableLookup::newParameters(tableNum(DimensionAttributeLevelValueAllView), divisionCodeLookup);
qbds= query.addDataSource(tableNum(DimensionAttributeLevelValueAllView));
qbdsJoin = qbds.addDataSource(tableNum(DimensionAttribute));
qbdsjoin.relations(true);
qbr = qbds.addRange(fieldNum(DimensionAttribute,Name));
qbr.value(queryValue('Project'));
sysTableLookup.parmQuery(query);
sysTableLookup.addLookupfield(fieldNum(DimensionAttributeLevelValueAllView, DISPLAYVALUE), true);
sysTableLookup.parmQuery(query);
sysTableLookup.parmUseLookupValue(False);
sysTableLookup.performFormLookup();
}
*/
private void PerfPeriodIdLookup(FormStringControl _formStringControl)
{
DimensionAttribute DimensionAttribute = DimensionAttribute::findByName('Project');
Query query = new Query();
QueryBuildDataSource qbdsFinancialTag,qbdsDirCategory;
QueryBuildRange qbr;
SysTableLookup SysTableLookup = SysTableLookup::newParameters(tableNum(DimensionFinancialTag),_formStringControl);
qbdsFinancialTag = query.addDataSource(tableNum(DimensionFinancialTag));
qbdsFinancialTag.addOrderByField(fieldNum(DimensionFinancialTag,Value),SortOrder::Ascending);
qbdsDirCategory = qbdsFinancialTag.addDataSource(tableNum(DimensionAttributeDirCategory));
qbdsDirCategory.relations(false);
qbdsDirCategory.addLink(fieldNum(DimensionFinancialTag,FinancialTagCategory),fieldNum(DimensionAttributeDirCategory,DirCategory));
qbr = qbdsDirCategory.addRange(fieldNum(DimensionAttributeDirCategory,DimensionAttribute));
qbr.value(queryValue(DimensionAttribute.RecId));
SysTableLookup.addLookupfield(fieldNum(DimensionFinancialTag,Value));
SysTableLookup.addLookupfield(fieldNum(DimensionFinancialTag,Description));
SysTableLookup.addSelectionField(fieldNum(DimensionFinancialTag,Value));
SysTableLookup.parmQuery(query);
SysTableLookup.performFormLookup();
}
No comments:
Post a Comment