I currently am using apex:reportChart to create a visual force page that will contain links to multiple reports. I have about 10 report charts that I would like to display. Right now, when clicking on a given chart, you are redirected to the related salesforce report.

However, when adding this page, to say the Home page as a component, the embedded VF page is redirected, and not the parent window. Below has some example code and image: enter image description here

<apex:page >
<apex:panelGrid columns="5" id="theGrid">

    <apex:outputLink onclick="window.parent.location.href = https://ex.my.salesforce.com/00Oo0000005gTOz">
        <analytics:reportChart reportId="00Oo0000005gTOz"  size="small" cacheResults="true"></analytics:reportChart>

    <apex:outputLink onclick="window.parent.location.href = https://ex.my.salesforce.com/00Oo0000005gMdW">
        <analytics:reportChart reportId="00Oo0000005gMdW"  size="small" cacheResults="true"></analytics:reportChart> 

    <apex:outputLink onclick="window.parent.location.href = https://ex.my.salesforce.com/00Oo0000005gMcJ">
        <analytics:reportChart reportId="00Oo0000005gMcJ" size="small" cacheResults="true"></analytics:reportChart>


Any ideas on how to go about this?

1 Answer 1


You need to wrap the url in single quotes. I would also simply set window.top.location.

    <apex:outputLink onclick="window.top.location = 'http://www.google.com'">
        <analytics:reportChart ... />

Dropping the quotes from the above is the only way I was able to reproduce the behavior you have observed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .