Implement search by printedStatus and customize SQL.