Report question

Question: How can I securely allow user defined SQL queries?