You need to sign in to do that
Don't have an account?
Corey Edwards 90
Add Report to Visualforce page
Hi All,
I have tried using the below code to bring through a report table onto a visualforce page but its only showing the head etc and no report on the page.. I know you can easily display a report chart, but this isnt what i am after. I could really do with this or another solution. Hopefully someone can help.
Code below..
I have tried using the below code to bring through a report table onto a visualforce page but its only showing the head etc and no report on the page.. I know you can easily display a report chart, but this isnt what i am after. I could really do with this or another solution. Hopefully someone can help.
Code below..
<apex:page standardController="User" sidebar="false" showHeader="false"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <apex:pageBlock> <apex:pageBlockSection title="Dealer Logins" id="DealerLogins" columns="1" /> <script language="JavaScript"> $('[id$="00O1o000004sZc3 "] > .pbSubsection > .detailList').load('/00O1o000004sZc3 table.reportTable.matrixReportTable'); </script> <style type="text/css"> [id$="EmbeddedReport"] > .pbSubsection { margin-top:10px; } [id$="EmbeddedReport"] > .pbSubsection tr:first-of-type th, [id$="EmbeddedReport"] > .pbSubsection tr:first-of-type td { border-top:1px solid #d4dadc!important; } [id$="EmbeddedReport"] > .pbSubsection th, [id$="EmbeddedReport"] > .pbSubsection td { font-size: 12px; padding:3px 6px 3px 5px; background-color:#fff; border-color:#d4dadc!important; border-bottom:1px solid #d4dadc!important; } [id$="EmbeddedReport"] > .pbSubsection th { background-color:#eee; } [id$="EmbeddedReport"] > .pbSubsection .grandTotal { background-color:#d4dadc; } [id$="EmbeddedReport"] > .pbSubsection .drilldown { display:none; } </style> </apex:pageBlock> </apex:page>
You can add Reports to the VF Page simply by using <analytics:reportChart>
Example:
Please follow the below steps in order to achieve this -
1.Go to the report tab
2. Click on your report
3.Click F12 to inspect element
4. Copy the src of your report as below -
You can also change the height and width of the iframe using 'height' and 'width' attribute.