• WHO WE ARE
  • WHAT WE DO
    • Salesforce
      • Implementations
        • Sales Cloud
        • Service Cloud
        • CPQ
        • Field Service Lightning
        • Field Service for SMEs
      • Developments
        • Salesforce Customization
        • Custom Application Development
        • AppExchange Product Development
      • Migrations
        • Classic to Lightning Migration
        • Other Systems to Salesforce Migration
      • Integrations
    • Data Science
      • BI Solutions
      • AI/ML solutions
      • Agentic AI
  • HOW WE DO
    • Delivery Model
    • Our Works
  • REACH US
    • Contact Us
    • Careers
  • BLOG
    • WHO WE ARE
    • WHAT WE DO
      • Salesforce
        • Implementations
          • Sales Cloud
          • Service Cloud
          • CPQ
          • Field Service Lightning
          • Field Service for SMEs
        • Developments
          • Salesforce Customization
          • Custom Application Development
          • AppExchange Product Development
        • Migrations
          • Classic to Lightning Migration
          • Other Systems to Salesforce Migration
        • Integrations
      • Data Science
        • BI Solutions
        • AI/ML solutions
        • Agentic AI
    • HOW WE DO
      • Delivery Model
      • Our Works
    • REACH US
      • Contact Us
      • Careers
    • BLOG
  • [email protected]
  • (+91) 44-49521562
Merfantz - Salesforce Solutions for SMEs
Merfantz - Salesforce Solutions for SMEs
  • WHO WE ARE
  • WHAT WE DO
    • Salesforce
      • Implementations
        • Sales Cloud
        • Service Cloud
        • CPQ
        • Field Service Lightning
        • Field Service for SMEs
      • Developments
        • Salesforce Customization
        • Custom Application Development
        • AppExchange Product Development
      • Migrations
        • Classic to Lightning Migration
        • Other Systems to Salesforce Migration
      • Integrations
    • Data Science
      • BI Solutions
      • AI/ML solutions
      • Agentic AI
  • HOW WE DO
    • Delivery Model
    • Our Works
  • REACH US
    • Contact Us
    • Careers
  • BLOG

How to View Students Report Using Visualforce Page in Salesforce

  • August 1, 2017
  • Merfantz Editor
  • Salesforce Developments Tutorial
  • 0

In salesforce report is the standard functionality to view details based on the criteria with a different type of representation. The dashboard is used to view the report in pictorial representation. If you need to view the dashboard through coding, you can use the below code. Compare with your standard dashboard, this one looking nice and comfortable to view details.

Visualforce Code :-

<apex:page controller=”StudentChartController” title=”Pie Chart Diagram” sidebar=”false”>

<apex:chart height=”300″ width=”400″ data=”{!stuData}”>

<apex:pieSeries dataField=”data” labelField=”name”/>

<apex:legend position=”right”/>

</apex:chart>

</apex:page>

Apex Class :–

public class StudentChartController{

public  List<Student__c> str=new List<Student__c>();

public List<String> lival=new List<string>();

public List<PieWedgeData> getstuData() {

str=[select id,name,marks__c from student__c limit 5];

system.debug(‘str’+str);

List<PieWedgeData> data = new List<PieWedgeData>();

for(Student__c s:str){

system.debug(s.name+”+s.marks__c);

data.add(new PieStuData(s.name, s.marks__c));

}

return data;

}

public class PieStuData{

public String name { get; set; }

public decimal data{ get; set; }

public PieStuData(String name, decimal data) {

system.debug(name+”+data);

this.name = name;

this.data= data;

}

}

}

Result:-

 

Pie Chart Diagram

We are the ISV Partners and Please reach us for custom development => www.merfantz.com

——————————- Happy coding Thank You——————————–

Author Bio

Merfantz Editor
+ Recent Posts
  • August 4, 2023
    How to Setup CRM Analytics for Financial Services Cloud
  • August 2, 2023
    How to Get Started with Salesforce Hyperforce - Merfantz
  • July 28, 2023
    Health Cloud Mastery: Salesforce Trailhead for Effective Healthcare CRM
  • July 26, 2023
    How to integrate Data cloud and Marketing cloud In Salesforce
Tags: Field Service ManagementFieldax
  • Previous How to Handle the SOQL Governor Limits in Salesforce
  • Next What are the Ways to Keep Away from Values Updated on View State Through Visualforce Page in Salesforce

Leave a Reply

You must be logged in to post a comment.

Merfantz Technologies is a leading Salesforce consulting firm dedicated to helping small and medium enterprises transform their operations and achieve their goals through the use of the Salesforce platform. Contact us today to learn more about our services and how we can help your business thrive.

Discover More

Terms and Conditions
Privacy Policy
Cancellation & Refund Policy

Contact Info

  • No 96, 2nd Floor, Greeta Tech Park, VSI Industrial Estate, Perungudi, Chennai 600 096, Tamil Nadu, INDIA
  • (+91) 44-49521562
  • [email protected]
  • 9:30 IST - 18:30 IST

Latest Posts

Let Einstein Help You Build - Salesforce Flow
Let Einstein Help You Build – Salesforce Flow May 15, 2025
Mastering Attachment Compression for Salesforce Developers May 9, 2025
Salesforce API Integrations: Connect with Slack, Zoom, and Teams May 2, 2025

Copyright @2023 Merfantz Technologies, All rights reserved