Hi guys, I have a problem, I'm creating a report using Data provider and Contract classes, it works so far, however, I'm trying to add a MultiSelect lookup to use it as a QueryBuilRange in my Query, I'm using a UIBuilder class to create the lookup, here's the lookup creation method:
public void storeLookup(FormStringControl storeLookup)
{
Query q;
//QueryRun qr;
QueryBuildDataSource qbds;
SysTableLookup sysTableLookup;
container cnt;
if(storeLookup != null)
{
q = new Query();
qbds = q.addDataSource(tableNum(table1));
qbds.addSelectionField(fieldNum(table1, store));
qbds.addGroupByField(fieldNum(table1, store));
SysLookupMultiSelectGrid::lookup(q, storeLookup, storeLookup, cnt);
}
}
It creates the lookup just fine; then in the Contract class I define a List variable and the parmMethod to get/set the values from the lookup:
[
DataMemberAttribute('storeCode'),
SysOperationLabelAttribute(literalStr("Store")),
AifCollectionTypeAttribute('storeCode', Types::String) //Temp
//SysOperationDisplayOrderAttribute('5')
]
public List parmStoreCode(List _storeCode = storeCode)
{
storeCode = _storeCode;
return storeCode;
}
Now, what I'm trying to do in the Data Provider class in the processreport() method is to get the List param using contract.ParmStoreCode() into a List variable, then this List variable is assigned to a method which gets all the values and make a concatenation into a string variable to get something like '1,2,3' and use that string as QueryBuildRange.value(stringVar) for example; however, everytime I run the report I get this:
Error executing code: List (object), method create called with invalid parameters.
Stack trace
(S)\Classes\List\create
(S)\Classes\SysOperationDataContractInfo\unpackDataContractObject - line 85
(S)\Classes\SysOperationDataContractInfo\unpack - line 20
(S)\Classes\SrsReportRdpDataContractInfo\create - line 4
(S)\Classes\Map\create
(S)\Classes\SysOperationFrameworkService\validateDataContracts - line 14
(S)\Classes\SysOperationRPCFrameworkService\validateDataContractsOnServer - line 6
(C)\Classes\SrsReportRunImpl\validateContract - line 30
(C)\Classes\SrsReportRunController\validate - line 21
(C)\Classes\SysOperationController\checkCloseDialog - line 28
(C)\Forms\SysOperationTemplateForm\Methods\closeOk - line 6
(C)\Classes\FormRun\task
(C)\Classes\SysSetupFormRun\task - line 20
and then:
Bad container.
How can i accomplish this? coul you help me out please? I would highly appreciate your help ,thank you.