SELECT pq.id,
		r.name report,
		p.name printer,
		pqa.name arg,
		pqa.value,
		r.method
	FROM printQueue pq
		JOIN report r ON r.id = pq.reportFk
		JOIN printQueueArgs pqa ON pqa.printQueueFk = pq.id
		LEFT JOIN printer p ON p.id = pq.printerFk
	WHERE r.name = ?
		AND pq.statusCode = 'queued'
		AND NOT r.method IS NULL
	ORDER BY pq.priorityFk ASC
	LIMIT 1