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
Case ManagerCase Manager 

Disable access to reports page from Home Page Component.

I have created a Home Page Component, in that compnent I have added a report using analytics:reportChart.  Its displayed on the Home Page but when I click it, it is being redirected to the page where we can run the report/make changes.  Is there any way to stop it from being redirected to another page.

Component -  homeComp
<apex:component >
<analytics:reportChart reportId="00Oj0000001bHGl" size="small" showRefreshButton="false" cacheResults="false" />
</apex:component>

HomePageComponent

<apex:page sidebar="false" showHeader="true" >    
    <c:homeComp />
</apex:page>
PratikPratik (Salesforce Developers) 
Hi,

I tried the same code you mentioned.  When I click on the chart, the reports get opened but there is no page re-direction.

Screnshot ( after clicking on report)

User-added image
Thanks,
Pratik
Case ManagerCase Manager
Hi Pratik,

Sorry to confuse you, page re-direction means its opening the report when I click on the chart, is there any way to stop this from happening.

Instead of creating a Home Page Component, just create an apex page with below code and click on the chart then you wont be redirected to Reports page.

<apex:page sidebar="false" showHeader="true" >    
    <analytics:reportChart reportId="00Oj0000001bHGl" size="small" showRefreshButton="false" cacheResults="false" />
</apex:page>

Thanks,
Sriram.