Export report on Custom Salesforce VisualForce Page

Salesforce is an expert in managing, isolating, and systematically arranging data. But sometimes some users are not comfortable with the standard reporting interface of the Salesforce Org; especially for those who are content with the good old CSV. For those users, Salesforce poses a challenge to deliver the reports in their convenient format.

Thus, for a common problem, we offer a simple solution! We have made exporting reports easy with Visual Force pages.

We have created Visual Forces pages to fetch the records and have deployed those VF pages in the Salesforce Org. These pages offer a ‘Choose a Report’ picklist for available reports in Org. You can select the report you want to download and then click on the ‘Export’ button. The reports will be downloaded on your System in CSV format.

Technology used:

Visualforce page, VF Remoting, Javascript, CSS, and HTML

Key Benefits:

  • The user doesn’t need to work to process each report, rather select any report from the picklist and click export.
  • The user can implement VF remoting with a VF page and javascript code for downloading CSV files.
  • There is an apex code for exporting reports in apex.

Demo Images

Salesforce visualforce page
Salesforce visualforce page
Salesforce visualforce page
Salesforce visualforce page

Sample Code to Export Reports via VF Pages:

Visualforce Page:

Apex Controller

Conclusion:

Exporting data has never been easier – make it simpler, neater, and efficient with this piece of code. For more assistance with Productivity Customizations or agent-friendly interfaces, reach out to us at [email protected]

Happy Coding!

Our Location worldwide
India
3rd Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203117884
SR Tower 2nd Floor Hydel Gate Haldwani Uttarakhand 263126 +91-5946359996
USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
Canada
HIC Global Solutions INC
43 Lafferty Lane, Richmond Hill, L4C 3N8, CA +1(262) 310-7818