Hello, I want to add modification to standard report 'TaxReportInclAdjustment'
I want to add lookup parameter (DataArea from the table CompanyInfo):
I want to know if its possible to create classes Contract, Controller and DP with the same logic of the standard classs
1. I add new IUBuilder class :
[
SrsReportNameAttribute(ssrsReportStr(TaxReportInclAdjustmentCopy, Report))
]
class TaxReportingUIBuilder extends SrsReportDataContractUIBuilder
{
TaxReportContract contract;
DialogField dialogTaxPeriod;
DialogField dialogFromdate;
DialogField dialogTodate;
DialogField dialogIncludeDetails;
DialogField dialogTransDate;
DialogField dialogVoucher;
DialogField dialogTaxReported;
DialogField dialogCompanyId;
AcxSysLookupMultiSelectGrid sysMultiGridCompanyId;
SysLookupMultiSelectCtrl syMultiLookupCompanyId;
container companyIdCon;
DialogField dlgCompanyId;
List companyIdList;
public void build()
{
contract = this.dataContractObject() as TaxReportContract;
dialogFromdate = this.addDialogField(methodStr(TaxReportContract, parmFromDate), contract);
dialogTodate = this.addDialogField(methodStr(TaxReportContract, parmToDate), contract);
dialogIncludeDetails = this.addDialogField(methodStr(TaxReportContract, parmIncludeDetails), contract);
dialogTaxPeriod = this.addDialogField(methodStr(TaxReportContract, parmTaxPeriod), contract);
dialogTaxReported = this.addDialogField(methodStr(TaxReportContract, parmTaxReported), contract);
dialogTransDate = this.addDialogField(methodStr(TaxReportContract, parmTransDate), contract);
dialogVoucher = this.addDialogField(methodStr(TaxReportContract, parmVoucher), contract);
}
public void postBuild()
{
super();
contract = this.dataContractObject() as TaxReportContract;
//binding dialogs with contract fields
dlgCompanyId = this.bindInfo().getDialogField(this.dataContractObject(),
methodStr(TaxReportContract, parmCompanyId));
}
public void postRun()
{
this.lookupCompanyId();
}
private void lookupCompanyId()
{
Query query = new Query();
QueryBuildDataSource qbd;
TableId multiSelectTableNum = tableNum(CompanyInfo);
container selectedFields = [multiSelectTableNum, fieldName2id(multiSelectTableNum, fieldStr(CompanyInfo, DataArea))];
qbd = query.addDataSource(tableNum(CompanyInfo));
qbd.addSelectionField(fieldNum(CompanyInfo, DataArea));
qbd.fields().dynamic(NoYes::No);
qbd.fields().clearFieldList();
qbd.fields().addField(fieldNum(CompanyInfo, DataArea));
SysLookupMultiSelectCtrl::constructWithQuery(this.dialog().dialogForm().formRun(), dlgCompanyId.control(), query, false, selectedFields);
}
/*private Query CompanyIdQuery()
{
Query query;
QueryBuildDataSource queryBuildDataSource;
query = new Query();
queryBuildDataSource = query.addDataSource(tableNum(CompanyInfo));
queryBuildDataSource.addSelectionField(fieldNum(CompanyInfo,DataArea));
return query;
}
private void CustAccountLookup(FormStringControl CompanyIdLookup)
{
sysMultiGridCompanyId = AcxSysLookupMultiSelectGrid::construct(CompanyIdLookup, CompanyIdLookup);
sysMultiGridCompanyId.parmQuery(this.CompanyIdQuery());
sysMultiGridCompanyId.run();
sysMultiGridCompanyId.setSelected();
}
public void getFromDialog()
{
super();
companyIdCon = syMultiLookupCompanyId.getSelectedFieldValues();
if (companyIdCon)
{
contract.parmCompanyId(con2List(companyIdCon));
}
}*/
/* public void postBuild()
{
super();
contract = this.dataContractObject() as TaxReportContract;
//binding dialogs with contract fields
dlgCompanyId = this.bindInfo().getDialogField(this.dataContractObject(),
methodStr(TaxReportContract, parmCompanyId));
}
public void postRun()
{
dialog.dialogForm().formRun().controlMethodOverload(false);
dialogCompanyId = this.addDialogField(methodStr(TaxReportContract, parmCompanyId), contract);
dialogCompanyId.lookupButton(3);
dialogCompanyId = this.bindInfo().getDialogField(contract,methodStr(TaxReportContract, parmCompanyId));
syMultiLookupCompanyId = SysLookupMultiSelectCtrl::constructWithQuery(this.dialog().formRun(), dialogCompanyId.control(), this.CompanyIdQuery());
}*/
}
2. I add new data Contract wihich contains the standard code and I add the parameter of companyId :
[DataContractAttribute,SysOperationContractProcessingAttribute(classStr(TaxReportingUIBuilder))
]
public class TaxReportContract implements SysOperationValidatable
{
boolean includeDetails;
TaxPeriod taxPeriod;
TransDate fromDate;
TransDate toDate;
TransDate transDate;
Voucher voucher;
NoYes taxReported;
List companyId;
///
/// Gets or sets the value of the datacontract parameter FromDate.
///
///
/// The new value of the datacontract parameter FromDate; optional.
///
///
/// The current value of datacontract parameter FromDate
///
[
DataMemberAttribute('FromDate')
]
public TransDate parmFromDate(TransDate _fromDate = fromDate)
{
fromDate = _fromDate;
return fromDate;
}
///
/// Gets or sets the value of the datacontract parameter IncludeDetails.
///
///
/// The new value of the datacontract parameter IncludeDetails; optional.
///
///
/// The current value of datacontract parameter IncludeDetails
///
[
DataMemberAttribute('IncludeDetails'),
SysOperationLabelAttribute(literalstr("@SYS316360"))
]
public boolean parmIncludeDetails(boolean _includeDetails = includeDetails)
{
includeDetails = _includeDetails;
return includeDetails;
}
///
/// Gets or sets the value of the datacontract parameter TaxPeriod.
///
///
/// The new value of the datacontract parameter TaxPeriod; optional.
///
///
/// The current value of datacontract parameter TaxPeriod
///
[
DataMemberAttribute('TaxPeriod')
]
public TaxPeriod parmTaxPeriod(TaxPeriod _taxPeriod = taxPeriod)
{
taxPeriod = _taxPeriod;
return taxPeriod;
}
///
/// Gets or sets the value of the datacontract parameter TaxReported.
///
///
/// The new value of the datacontract parameter TaxReported; optional.
///
///
/// The current value of datacontract parameter TaxReported
///
[
DataMemberAttribute('TaxReported')
]
public NoYes parmTaxReported(NoYes _taxReported = taxReported)
{
taxReported = _taxReported;
return taxReported;
}
///
/// Gets or sets the value of the datacontract parameter ToDate.
///
///
/// The new value of the datacontract parameter ToDate; optional.
///
///
/// The current value of datacontract parameter ToDate
///
[
DataMemberAttribute('ToDate')
]
public TransDate parmToDate(TransDate _toDate = toDate)
{
toDate = _toDate;
return toDate;
}
///
/// Gets or sets the value of the datacontract parameter TransDate.
///
///
/// The new value of the datacontract parameter TransDate; optional.
///
///
/// The current value of datacontract parameter TransDate
///
[
DataMemberAttribute('TransDate')
]
public TransDate parmTransDate(TransDate _transDate = transDate)
{
transDate = _transDate;
return transDate;
}
///
/// Gets or sets the value of the datacontract parameter Voucher.
///
///
/// The new value of the datacontract parameter Voucher; optional.
///
///
/// The current value of datacontract parameter Voucher
///
[
DataMemberAttribute('Voucher')
]
public Voucher parmVoucher(Voucher _voucher = voucher)
{
voucher = _voucher;
return voucher;
}
///
/// Gets or sets the value of the datacontract parameter companyId.
///
///
///
/// The current value of datacontract parameter companyId
///
[
DataMemberAttribute('CompanyId')
]
public list parmCompanyId(list _companyId = companyId)
{
companyId = _companyId;
return companyId;
}
///
/// Validates the SSRS report parameters.
///
///
/// true if successful; otherwise, false.
///
public boolean validate()
{
boolean ret = true;
if (!fromDate)
{
fromDate = systemdateget();
}
if (!toDate)
{
toDate = systemdateget();
}
if (toDate < fromDate)
{
ret = checkFailed("@SYS16982");
}
return ret;
}
}
3. I add new DP class which contains the same code standard
4. I duplicate the standard report 'TaxReportInclAdjustment' and I change the DP

5. I change the properties of menItem and I set the new controller class.
But I don't get any result