print results only if the table is not empty