I've created a matrix report and I would like to know how to display it in my VF page using iframe. But I would like to be able to dynamically filter the report as users select different account ID from my VF page.

  • How are you able to keep the page from displaying outside of the object. For example. I have a VF page that supposed to display a report in my case object but when the object loads, reports opens shortly after. – I.Jones Oct 19 '16 at 18:59

you can pass "pvX" parameter to the report endpoint to set the filters values. See this article http://jessealtman.com/2013/08/passing-parameters-to-a-report-through-the-url/ . E.g.


Hope this helps!

| improve this answer | |
  • I'm very new at this. I was successfully at adding this to iframe. <iframe height="600px" id="theIframe" name="theIframe" src="salesforce.com/00O370000011hLx?pv1={!Account.Id}" width="100%"></iframe> – user7123 Jul 31 '15 at 11:04
  • "Account" should be the object your visualforce is based on (if it is an Account, then Contact if it is a Contact, and so on...if you use a custom controller than you can user whichever variable you want). pv0, pv1 , pvN is the "Nth" filter of your report, so you have to use the pvX filter you need in your URL – Enrico Murru Jul 31 '15 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.