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
aniilpianiilpi 

Run Report from Visual Force

Hi All,

 

I have a requirement that i have to run a report from a visual force page.

I am presently hard coding the report id in the URL.

Can anyone suggest me how to avoid the hard coding and query for the report id.

 

Regards,

Anil

Best Answer chosen by Admin (Salesforce Developers) 
Cool_DevloperCool_Devloper

For hiding the sidebar and header,  add "?isdtp=mn" to your url.

I think, now your report should come without the whole window;)

Cool_D

Message Edited by Cool_Devloper on 12-05-2009 12:15 AM

All Answers

SaaspertSaaspert

looking for solution to similar issue . can anyone suggest a good solution please ?

thanks

NajoopNajoop

I have a similar requirement

I can give report source in Iframe src attribute but that brings up the whole browser window in that frame. I only want the report output to get displayed.

 

any directions are is appreciated.

 

Poojan.

MktCnslMktCnsl
Looking to do the same thing.  I need to display report details on the homepage, but when I do it with iframe, the entire webpage shows.  How can I just show the report details?
WmWm

Hi,

 

How are you displaying the report in a visualforce page?

Can you please give me some pointers on that? It will be a great help.

 

Thanks in advance

Garima

Cool_DevloperCool_Devloper

For hiding the sidebar and header,  add "?isdtp=mn" to your url.

I think, now your report should come without the whole window;)

Cool_D

Message Edited by Cool_Devloper on 12-05-2009 12:15 AM
This was selected as the best answer
Cool_DevloperCool_Devloper

@Anil,

You cannot query the Reports as of now in Apex as it is not a queryable object:(

As a workaround, you can create a custom object, where you can create fields as per the business logic you want to use to get the report ID dynamically. Store the requisite Report Id as well as one of the fields, so that you can now get it through a query on this custom object.

Will this work for you?

Cool_D 

sreenathsreenath

Hi,

 

          Please provide some sample code how you are displaying the reports in visualforce page.

 

 

Thanks

Sreenath