Add query to print to pdf