how can I generate advanced report as pdf?

I created advanced report using custom query and it is working. The report runs correctly. But I cannot generate the report as pdf. I can only export the report to csv file.I want to generate the advanced report as pdf. Please advise me!!