private static server str CalculateTotal()
{
StockSummary StockSummary;
str viewField, viewField1, viewField2, viewField3, viewField4 ;
DictView dictView;
str NoOfRecords;
dictView = new DictView(tableNum(StockSummary));
viewField = dictView.computedColumnString(tableStr(View1),fieldStr(View1, field),FieldNameGenerationMode::FieldList,true);
viewField1 = dictView.computedColumnString(tableStr(View2),fieldStr(View2, Field),FieldNameGenerationMode::FieldList,true);
viewField2 = dictView.computedColumnString(tableStr(View3),fieldStr(View3, Field),FieldNameGenerationMode::FieldList,true);
viewField3 = dictView.computedColumnString(tableStr(View4),fieldStr(View4, Field),FieldNameGenerationMode::FieldList,true);
viewField4 = dictView.computedColumnString(tableStr(View5),fieldStr(View5, Field),FieldNameGenerationMode::FieldList,true);
NoOfRecords = strFmt('count(%1) + count(%2) + count(%3) + count(%4) + count(%5)',viewField ,viewField1,viewField2,viewField3,viewField4);
return NoOfRecords;
}
(2) I created a new View and added the previous View to it as a datasource with the Range IsEmpty !=0.
(3) Added this new view of point(2) to my form datasource and it worked fine as I was expecting the records to filter out.