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

Reports using Apex/Visualforce

Its painful trying to use the standard reporting.  Something as easy as sorting a summary report by the totals metric is just not possible.


I have heard some people say you can use Apex/VF to create more flexible reporting but I have never seen an example and I'm not even sure if that is accurate.


Does anyone have any sample reporting that was builty using apex/vf ? 








If you want to display standard reports/dashboards with a VF page, I think an iframe is suitable for you.
set the source of the iframe to the URL of your report/dashboard.


Below is the sample code to Display report in VFP


  <apex:iframe src=""/>


IF this Reply helps you to resolve the problem or resolves the problem marks it as Resolved.


Apex/VF is good for this. Well, it is for me because I'm a Programmer.


Especially if you want lists sorted by specifical coluns or  trees down multiple levels.


"Apex/VF is good for this. Well, it is for me because I'm a Programmer."



I too usually have the habit of wanting what isn't avaible out of the box (or too hard to figure out in the time I want to have it), programming it just gives the liberty you want.


Apex/VF allows you to do what you want pretty much (within platform limits), offering a much higher flexibility, because you can handle a lot more object types, or create wrapper objects.  Though, you become responsible for rendering the output, if you just want tables of data it's easy, if you want graphs, you'll have to use some javascript libraries (but that's not hard either). 


Of course apex/vf requires developer knowledge, test code and all that stuff.



Thanks everyone.. The out of the box reports have Gaping holes.   What I really want to do is have a few picklists on a VF page.. have the user select a few and generate a report (in excel would be awesome)...


Does anyone have any samples to get me started? 






Hi Fred,

Did u got any solution for above question. I am also facing same issue. Can u pls share the sample code.  its urgent pls