Re: computedField - NaN
Tomasz,
I didn't test it myself but I suppose if the view "report" has no document with the key key[i], then @DbLookup("","Report",keys[i],3) will return null => @Sum will fail because it cannot convert null to a number (NaN means Not A Number).
You should try this instead :
for (i = 0; i < keys.length; i++)
{
var lkp= @DbLookup("","Report",keys[i],3);
if (lkp!=null) {
v = @Sum(lkp);
result.push(v);
} else {
result.push(0);
}
Hope this helps.
Renaud