There are 2 options to get the data easily, that I would consider.
- Summary field ( defined as ListOf ), that pulls in the value of a stored calculation. So you would find the records you want, and then just grab the value of that field.
- Virtual List - find the records you want, then just loop and stuff them into a variable.
How many "errors" are you grabbing? If it's less than 5-10k, either method is fine.