You need to sign in to do that
Don't have an account?

Open VisualForce Report from Account Page Layout to new Window with filtered data
Hello All,
I have a simple VF page that opens a Chart on a Account Page Layout;
<apex:page standardController="Account">
<script type="text/javascript">
function Test(){
var url = '/00Oj0000004KjPM';
window.parent.location.replace(url);
}
</script>
<apex:outputLink onclick="Test();">
<analytics:reportChart cacheResults="false" reportId="00Oj0000004KjPM"
filter="{column:'FK_ACC_ID',operator:'equals',value:'{!Account.Id}'}"
size="small">
</analytics:reportChart>
</apex:outputLink>
</apex:page>
This works ok but I cannot get the report to open in a 'new' window and the report that does open is not filtered by the Account id.
Any thoughts or suggestions is alwys appreciated.
Regards,
M
I have a simple VF page that opens a Chart on a Account Page Layout;
<apex:page standardController="Account">
<script type="text/javascript">
function Test(){
var url = '/00Oj0000004KjPM';
window.parent.location.replace(url);
}
</script>
<apex:outputLink onclick="Test();">
<analytics:reportChart cacheResults="false" reportId="00Oj0000004KjPM"
filter="{column:'FK_ACC_ID',operator:'equals',value:'{!Account.Id}'}"
size="small">
</analytics:reportChart>
</apex:outputLink>
</apex:page>
This works ok but I cannot get the report to open in a 'new' window and the report that does open is not filtered by the Account id.
Any thoughts or suggestions is alwys appreciated.
Regards,
M
<analytics:reportChart reportId="00Ob0000003sJ0a" cacheResults="false" showRefreshButton="False" filter="{column:'ACCOUNT_ID', operator: 'equals', value: '{!Id}'}" ></analytics:reportChart>
Please set the target attribute in the apex:output link as "_blank"
this tells the browser to open the link in the new tab, new window.
Hope it helps
RD
Cheers,
M
<apex:page standardController="Account">
<script type="text/javascript">
function Test(){
}
</script>
<apex:outputLink onclick="Test();" target="_blank">
<analytics:reportChart cacheResults="false" reportId="#############"
filter="{column:'ACCOUNT_ID', operator: 'equals', value: '{!Id}'}"
size="small">
</analytics:reportChart>
</apex:outputLink>
</apex:page>