public boolean fetch()
{
QueryRun qr;
QueryBuildRange rangeTransDate;
Boolean ret;
qr = new QueryRun(element);
rangeTransDate =
element.query().dataSourceTable(tablenum(CustTrans)).addRange(fieldnum(CustTrans, transDate));
rangeTransDate.value(queryRange(systemdateGet()-daysBack, systemDateGet()));
rangeTransDate.status(RangeStatus::LOCKED);
element.design().caption(strfmt("%1, %2", element.design().caption(), rangeTransDate.value()));
if (qr.prompt() && element.prompt())
{
while (qr.next())
{
custTable = qr.get(tableNum(CustTable));
custTrans = qr.get(tableNum(CustTrans));
if (!custTable)
{
ret = false;
break;
}
if (qr.changed(tableNum(custTable)))
{
element.send(custTable, 1);
}
if (qr.changed(tableNum(custTrans)))
{
element.send(custTrans, 2);
}
}
ret = true;
}
else
ret = false;
return ret;
}
strScan (Find a first occurrence of a string in a string) info("int strScan(str _text1,str _text2,int _position,int _number)"); info("Searches a text string for the occurrence of another string."); info("_text1 - The text string to search."); info("_text2 - The string to find."); info("_position - The position at which the search should start."); info("_number - The number of characters that should be searched."); info(int2str(strScan("ABCDEFGHIJ","DE",1,10)));