Reports and Dashboards in Salesforce


What is a Report in Salesforce?

    A report is a set of records displayed in rows and columns. Reports data can be filtered, grouped and can be displayed through graphical chart types like Tabular reports, Summary reports, matrix reports and Joined reports. Salesforce Reports can be Standard reports and Custom reports.

    Salesforce Reports are used to generated data and display the data in the form of Rows and Columns with rule criteria. Every report in Salesforce is stored in Folders. We can set folders to hidden, Shared, read-only, or read/write. There are two types of Reports in Salesforce.
Standard Reports.
Custom Reports.

Standard Reports: Standard Reports in Salesforce are the ones created when an object is created and can not be modified.

Custom Reports: Custom reports in Salesforce are created by the admin for a custom object. Custom reports are of four types they are.
  • Tabular Reports.
  • Summary Reports.
  • Matrix Report.
  • Joined Report.
Tabular Reports: Tabular Reports in Salesforce are the most basic, simplest, and fastest generates report formats. Here fields are listed in Columns and records are listed in rows. It displays just the row of records in a table-like format with the grand total. Tabular reports are not used to created Dashboards in Salesforce.

Summary Reports: Summary Report is the second Salesforce report format that allows users to group rows data which supports sorting and display subtotals.

Matrix Report: Matrix report is the most complex Salesforce report format where records data is summarized in a grid format. Matrix reports allow records to be grouped by both columns and rows.

Joined Report: Joined report is the fourth Salesforce Report format where user can create multiple report blocks that provide different views of your data. Here we organize the data in the form of blocks. Each block is defined as a Sub-report. It can have its own fields, columns, sorting, and filtering. A joined report can even contain data from different Salesforce report types.

Salesforce Report Types:

Report types in Salesforce are like a template or framework used by salesforce to get data from objects, relationships, and fields. There are two types of reports types in Salesforce.
  • Standard Report types
  • Custom Report Types.

Standard report types:
    Standard report types are the ones provided by salesforce.com by default and stored in the Standard report folder.

Custom Report Types:
    A report type defines the set of records and fields available to a report based on the relationships between a primary object and its related objects. Reports display only records that meet the criteria defined in the report type.


Interview Questions on this topic:

1. What Is Report?
  • To summarize the information of an object we use reports.
2. What Are Different Types Of Reports?

  • Tabular report: This is the most basic report. It displays just the row of records in a table-like format with a grand total. Tabular reports cannot be used for generating dashboards.
  • Summary report: This is the most common type of report. It allows the grouping of rows of data. It supports sorting and displaying subtotals. For example in a recruiting app, a summary report could be used to display open positions classified by department name.
  • Matrix report: This is the most complex report format. Matrix report summarizes information in a grid format. Matrix reports allow records to be grouped by both columns and rows.
  • Joined Reports: Joined reports let you create multiple report blocks that provide different views of your data. Each block acts like a “sub-report,” with its own fields, columns, sorting, and filtering. A joined report can even contain data from different report types.
3. What All Reports Can Be Used To Generate Dashboards?
  • Summary and Matrix reports
4. What All Things Are Not Supported In Joined Reports?
  • The following items aren’t supported in joined reports, and aren’t converted:
    • Bucket fields
    • Cross filters
    • The Rows to Display filter
5. What Are Bucket Fields?

  • Bucketing lets you quickly categorize report records without creating a formula or a custom field. For example, create a bucket field named Size based on the # Employees field. Then, create buckets that group records into “Large,” “Medium,” or “Small” range that you define. Bucket fields can be used like any other field to sort, filter, and group your report.
You can add up to five bucket fields per the report, each with up to 20 buckets. Only numeric, picklist and text fields can be used for bucketing. Other data types are not supported.

6. Can We Create A Formula Type In Reports?

  • Yes.
    • The formula is not available in tabular reports but is available for other report types.
    • The formula can be only in number, currency, and percent format.
7. What Is A Custom Report Type?

  • Custom report types allow you to build a framework in the report wizard, from which users can create and customize reports. You build custom report types off of the relationships (master-detail and lookup) between objects so that you can:
    • Choose which standard and custom objects to display to users creating and customizing reports.
    • Define the relationships between objects displayed to users creating and customizing reports.
    • Select which objects' fields can be used as columns in reports.
    • Note that the visibility of custom report types in the report wizard is controlled by users' access to the objects in the report type.
    • You may define which related records from other objects are returned in report results by choosing a relationship to another object.
    • You can associate up to four objects to a custom report type.
8. What Is the Difference Between Custom Report Types And Standard Report Types?

  • Standard report types are report types that salesforce creates itself when we create objects and relationships between them.
  • Custom report types allow the admin to specify what all fields will be available to the user while creating a report. Also, it provides the functionality to associate up to 4 objects.
9. How Access To Reports And Dashboard Is Controlled In Salesforce?

  • Access to reports and dashboards is controlled by the folder in which they are stored. If the user has access to a folder then they can run reports present in that folder.
In reports data displayed is as per the running user's security access. Reports can be run on both standard and custom objects.

Reports data is always generated in real-time. When a report is saved, reports configuration parameters are stored but the generated data is not stored.

10. What Is Analytical Snapshot?

  • Analytical snapshot allows reports run at the scheduled times to be stored as objects. Analytical snapshots are used to perform trend analysis. As an example, if we want to view how monthly sales are growing, fields in a report with sales figures can be stored in a custom object every month using an Analytical snapshot. Data in this custom object can then be used to perform trend analysis.

Analytical snapshots are available from the Data Management menu option. Source report in Analytical snapshot can be of the type Tabular or Summary.

Setup Analytical reports require a four-step process:
  • Select source report
  • Select custom object
  • Map source report fields to custom object fields
  • Schedule the frequency for taking the snapshots
11. What Is Dashboard?
  • Dashboards are graphical representations of reports. Dashboards can be generated for summary or matrix reports (and not for tabular reports). Dashboards display data as per the last time the report was run.
A dashboard can have up to 20 components.

12. Is it possible that the Data you see on Dashboard and Data you See on Report after Drilling Down the Report on Dashboard is different?
  • Yes.
    When a user views the drill-down report for a dashboard component, running the user's access permissions determine what data is displayed on the drill-down report. Hence it is possible that data in the drill-down report does not match the cumulative dashboard data.

Remember reports run based on current or logged-in users and display real-time data but the dashboard stores the information from reports when you refresh the dashboard. In order to see real-time data on a dashboard, refresh the dashboard.

Also, the dashboard can run based on logged-in users or specified users but reports always run based on logged-in users.

13. What Are Different Chart Types Available For Dashboards?
  • Vertical column
  • Horizontal bar
  • Line
  • Donut
  • Funnel
  • Pie
A funnel is used to show the proportion of values against each other.

Pie is used to demonstrate the proportion of a single value against the total.

Donut is used to demonstrate the proportion of a single value against the total and also show the total value.

14. What Are the Limitations Of Salesforce Reports?

  • Support for trend analysis in Salesforce is fairly limited.
  • User Interface of Salesforce reports and dashboards is fixed. Salesforce does not support pixel-perfect reports.
  • Salesforce reports do not support importing data from other sources
  • When displaying objects and their children, Salesforce does not support reporting on objects that do not have any children.
  • If an object has two different related lists, then Salesforce reporting does not support displaying both these related lists together.
15. Explain Dynamic Dashboard?

  • Dynamic dashboards in Salesforce display a set of metrics that we want across all levels of your organization.
    Dynamic Dashboards in salesforce are Created to provide security settings for the dashboards in salesforce.com. We may have a requirement in an organization to “view all data” by every user in an organization according to their access we have to select Run as Logged-in User. There is two setting options in Dashboards.

They are:
  • Run as the specified user.
  • Run as Logged-in User.
16. Can We Mass Delete Reports Using Apex (anonymous Apex)?

    Salesforce has not exposed any API for Reports. So the best way is :
Move all reports that need to delete to the new folder.
Inform everyone that reports will be deleted after some time maybe 30 days.
Import your reports folder in Eclipse including all reports to be deleted and then delete the reports folder in eclipse. It will delete all the reports at once.

17. How Many Records We Can Display On Page For A Report?

    We can display up to 2000 records on a page. If more records are there to display we cannot see those through the user interface. If you export the records to an excel sheet then you can export all records.