function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
srikanth challasrikanth challa 

How to create a report in PDF using visual force?

Presently I am using the following syntax but I am getting a blank pdf page with this. Can anyone please help me

<apex:page standardController="Report" renderAs="pdf">
  <apex:iframe src="/00OK0000000TZ2u"/>  
Try this:
<apex:page renderAs="pdf">
  <apex:iframe src="/00OK0000000TZ2u?isdtp=mn"/>  
srikanth challasrikanth challa
Thanks for replying, still it is displaying a blank pdf page!
I just realized that after 14' release you can't call cross browser URL in iframe.
You can check using chrome if you are getting below error:
User-added image

There is a workaround but with that you can open report in seperate tab and then download it as PDF using chrome standard way.
<apex:page sidebar="false" showHeader="false">
  <a href="/00OK0000000TZ2u?isdtp=mn" target="_blank">Generate</a>


any reason to pass a Id in <apex:iframe>?
you can try using <apex:outputtext value="hello"/> and a pdf page is rendered with hello in it.

Also, more explanation is given in below links why when using apex:iframe in vf it appears blank:
srikanth challasrikanth challa
Saransh, actually we want to send the pdf report to the customer. Is there any way which we can generate a report in pdf format directly?User-added image