Salesforce Report Types Explained
Salesforce Report Types Explained

Salesforce Report Types Explained

06/11/2020 by Erin Ramirez
In this post, we explain what a Salesforce Report Type is, what it does, and how you can use custom Report Types to get your job done.

One of the things that tend to trip up Salesforce users when it comes to creating reports is selecting the correct Report Type. It gets harder if you’re only kinda sorta not really sure what Report Types are and what they do. Don’t get Report Types confused with Object Record Types. They are entirely different. Let’s clear it all up.

What is a Report Type?

In Salesforce, a Report Type acts as a template. It defines the following:

  1. Objects: what Objects the report can see (e.g. Accounts, Contacts, Opportunities, etc.)
  2. Object Relationships: The overlap between the selected objects
  3. Fields included in results
  4. Fields checked by default: Which fields will appear on your new report automatically 
  5. Field Display Names

Salesforce comes with numerous predefined Report Types, which is great, but sometimes they don’t give you quite what you need. As these predefined fields need to be maintained across all orgs, you can’t edit Salesforce’s predefined Report Types. You can, however, create a Custom Report Type where you not only get to define what you want to see object and field-wise, you can edit it any time changes are needed.

To get started, click the gear icon and go to Setup > search for “Report Types” in the Quick Find box > click the “New Custom Report Type” button.

1. Objects

Many systems call them tables. Salesforce calls them objects. Report Types allow you to select which objects a Report Type looks at, starting with the Primary Object. Think of the primary object as the key output of your report. If you’re looking at the name of the Report Type, the Primary Object will be the first object listed. If you use the “Contacts & Accounts” Report Type, your primary output will be Contacts. If you look at the “Opportunities with Contact Roles” Report Type, your primary output will be Opportunities.

After you’ve selected your Primary object, you can then select up to three additional objects (for a maximum total of four). Let’s call those secondary objects. The objects you’re allowed to select as secondary objects are defined by relationships built into the platform and your organization’s unique Salesforce configuration. (You won’t be able to define a new relationship here.) These objects you select must be linked together in the appropriate hierarchical order. To see the needed objects, you have to start at the TOP of the hierarchy and determine how the connection between the objects flows “downstream”.

For example, you can set the Primary Object as Accounts and set the secondary object as Opportunities because Opportunities look up to Accounts. That means Accounts are at the top of this particular hierarchy. Think of it this way — an Account can have multiple Opportunities, but an Opportunity is only linked to one Account.

2. Object Relationships

Once you’ve selected your (maximum four) objects, the next step is to determine how your objects need to interact or relate to one another. Let’s look at two scenarios with Accounts as the Primary object (A) and Contacts as the secondary object (B)

This example, which we’ll call “Accounts with Contacts”, will only show results where an Account has a Contact record attached. The overlap is represented by the Venn diagram shown next to the Primary Object and secondary object selection below. Results will exclude records where the Account does NOT have a Contact. Contacts without Accounts will also be excluded because the Primary Object is not Contacts.

This next example, which we’ll call “Accounts with or without Contacts”, is different because instead of requiring the Account to have a Contact in order to appear in our results, we’re allowing Accounts to appear regardless of whether or not they have a contact. If the Account does have a Contact, that Contact info can be included in the results. Note the difference in this next Venn diagram.

The more objects you include in your Report Type, the more complicated your Venn diagrams may become. Here’s an example that looks at Accounts with Contacts with Opportunities. See how our results are restricted by that very narrow overlap between all three objects in the Venn diagram below? Our results will only show Accounts that have Contacts attached and those Contacts must also have attached Opportunities.

There is one extra thing to consider. You don’t need to select a secondary object. You could, for example, select Contacts as the Primary Object and leave it at that. Your report would look at all Contacts regardless of whether or not they have an Account or a connection to any other object. In fact, if you want to find Contact records missing an Account, this Report Type is the way to go.

3. Fields Included in Results

Once you have your Primary and other objects selected and relationships set as needed, save your Report Type. The next thing to think about is which fields will be allowed in the report. This is done via the layout. The layout is where you select which fields can be included for filtering and output. To get there, click the “Edit Layout” button in the “Fields Available for Reports” section toward the bottom. Here is what the layout screen looks like.


Let’s break this down in a little more detail...

The left side of the screen, where you see all the gray boxes, contains the fields that have been selected to be included in your Report Type. These are grouped into Sections. Salesforce will automatically create sections for you based on the objects you selected to be part of your Report Type, but you can create new sections, move fields from their default sections to the new sections.

The right side of the screen shows you a legend on top explaining what the different colors indicate. Below that is a View list where you can select which object you’re looking at. Fields in that object that are grayed out are already on the layout. Fields in Green, like the one below labeled “Approved Revi…” are not on the layout. To add that field, simply drag it and drop it in the appropriate section on the layout.

You’ll also see a link (“Add fields related via lookup”) that allows you to include fields on your layout if those fields are related to one of your selected objects via a lookup. For example, if you’re looking at the Contact object in an NPSP org, you can pull in fields from the Account linked to that Contact via the Primary Affiliation lookup.

One final note. If you want to remove a field from your layout, it’s a bit of a challenge to simply drag the field off the layout because it takes a lot of time for Salesforce to activate the right-hand panel to accept the field. Instead, create a new section called “Fields to Delete” (or similar) and drag the unwanted fields to that new section. Once you’ve moved all the unwanted fields, delete the entire section. Don’t worry, you can add the fields again if needed.

4. Fields Checked by Default

You’ll note that some fields have a checkmark next to them. That means those fields will be automatically included in your report outline when you use this template to create a new report. To check a field, double click on the gray box with the field name (you can hover over the box to get more details if the name is truncated).

Check the box in the “Checked by Default” column then click OK. You can select and check the boxes for multiple fields by Command + Click (Mac) or Control + Click (Windows). Be sure to save your changes when you’re done!

5. Field Display Name (aka Report Column Headers)

As you know, some field names in Salesforce can get quite long and can take up a lot of real estate on your report. Or maybe you have fields that aren’t always labeled well for viewing them out of context (e.g. on a report instead of on a Contact detail page). 

Report Types allow you to give fields on your report a display name so space doesn’t get wasted and/or so fields can make more sense. Let’s take, for example, an NPSP field named “Number of Soft Credits Last N Days”. A) That’s a long field name and B) if the people viewing the report don’t know the value of N off the tops of their heads (the default is 365 days), that could be a challenge.

Again, double click on the gray box with the field name and edit the Display Name field. Here we’ve replaced “Number of” with “#” and replaced “N” with 365. We’ve shortened the field name a bit and we’ve given context to what N means. (Keep in mind you’ll have to update the field name if you ever adjust the value of N.)

A few things to keep in mind. When you change the display name of a field, that’ll be the display name seen by anyone using this Report Type (but only this Report Type...not other custom Report Types or standard Salesforce Report Types). Make sure the name changes will make sense to everyone!

New Custom Fields

A word of caution. When you create a new custom field in Salesforce, that new field will be added automatically to all applicable standard Report Type definitions. You will still need to add the field to your actual report. New custom fields are not automatically added to your custom Report Types (at least for now). Be sure to edit your custom Report Types and add your new field to your list of fields available in your report results and then add the field to the actual report.

Suggested Resources

There are lots of great Salesforce reporting resources available. Here are a few of my favorites:

Now that you have a better understanding of Report Types, what they do, how they’re used, and how to create them, go forth and wow your colleagues with your Salesforce reporting skills!

Do you have any handy tips for creating or selecting Report Types?  What tends to trip you up when creating reports? Let us know and we’ll discuss it in a future blog post. Tell me all about it in the comments below, in the Salesforce Trailblazer Community, or tweet directly at me on Twitter @emadram