Cloud for Good
Search
Close this search box.

Salesforce Analytics 101: Report Types

What is a Report Type?  

When you’re creating a Salesforce report, the first thing you have to choose, before you even get to the report builder, is the Report Type. The Report Type is a defined set of related objects and fields you can use in your report. For example, if you choose Accounts and Contacts, your report can contain all of the fields on both the accounts and contacts objects that are visible to you. If you choose Opportunities with Payments, you can see Opportunity fields, Payment fields, and Account fields because of the relationship between Accounts and Opportunities.

How Do I Choose?

When you’re building a report, one of the first things you need to think about is WHAT you want to see. Then, think about where that data lives in Salesforce. Based on where that data lives, you can choose your report type. Sometimes, your data might all be on one object, and sometimes it’s on multiple related objects. Salesforce enables you to relate objects in a tree/stair-step fashion in report types. The diagrams below show valid and invalid Salesforce report types.

 

If the information you want to report on can be found in the Report Types already available, you’re all set to begin building your report – simply choose the correct report type, and click Create.

What if my objects or fields are not in an existing report type?

Sometimes, if you’re missing information from a related object (for example, the number of activities you’ve logged against a contact record), you can add that field to your report by creating a new field on your object (in this case Contacts).  Depending on what you’re trying to aggregate, you could build a formula field, a Roll-up Summary field (if the objects have a master-detail relationship and you’re building the field on the master), or a text/date/number field that’s populated using Process Builder. If you aren’t able to aggregate the data using these out-of-the box methods, there are also tools like Rollup Helper and Declarative Lookup Rollup Summaries that you can install and configure.

But, Salesforce also has some other nifty tricks for adding fields from related objects to reports. You can build custom report types, and then you have the option to choose what fields you include in your report types, including fields related via lookup to the objects in your report type. If you don’t see a report type with the objects you need, or you need to add additional fields to a custom report type, you (or your Salesforce Admin) can do that!

In the Salesforce Setup menu, search for Report Types. Here, you can view and edit any custom report types that have already been created, or create a new custom report type. To create a new report type, click the New Custom Report Type button. Then, select the Primary Object, give your report type a label in the Report Type Label field, enter a Description, and choose a Category to store your report type in. Here, you can also choose whether to immediately Deploy the report type (make it available to all users with access to the objects in the report), or to keep it In Development (so it would only be visible to authorized administrators or users with special profile permissions). Ideally, you should be keeping the report type In Development until you’ve tested it and are certain it displays the data you were trying to report on. Then, click Next. In step two, you’ll select the Object Relationships, and choose whether the secondary (and additional) objects must exist for the primary object to appear in the report.

Once you’ve selected the objects and the type of relationship for each of the objects, Save your report type.  Note that you can continue adding related objects (up to 4 objects deep) as long as there are further objects to relate.

Next, you can view the fields that are available for your new custom report type, and you can rearrange the layout, and add additional fields. Click the Edit Layout button to customize the fields included in your report type. A note here: If you add new fields to an object after you’ve created a custom report type, you need to come back and add those new fields to your custom report type – they aren’t added automatically.

You can rearrange the sections the fields are in, as well as rearrange fields included in the layout by dragging and dropping. Then, on the right of the screen, you can view the fields for each of the objects included in your report type. This is also where you add fields via lookup. You can relate up to a total of 60 objects in your report type using this feature. Note, though, that even if you don’t include fields for an object, it still counts against your limit . If you lookup Campaign Owner > Campaign Owner Role, and don’t include fields from Campaign Owner, it still counts as a related object because you need it to get to the Owner Role. 

To add or remove fields, simply select the object from the View drop-down list, and then drag new fields onto the layout – drop them in the section / position you’d like them in.

To add fields related via lookup, click the link just below the View pick-list (note that you’ll want to select the relevant object in the view pick-list first). This will open a new window that allows you to choose the related objects and fields. So, from the Opportunity, as seen in the example here, you can navigate to Account fields, Contract fields, Created by User, Opportunity Owner, Last Modified by User, Price Book, Primary Campaign Source, Synced Quote, and more (especially if you’ve added custom lookup fields to the Opportunity).

Once you’re looking at the fields for the desired object, use the check-boxes to check all of the desired fields, and click Ok. You can repeat this process to add fields from other related objects. The fields will be placed in the section for the object you started from. In our example, the fields are placed in the Opportunities section. You can leave them there, or you can create a new section and move the fields. It’s easy to tell which fields have been added via lookup, because they are displayed with the familiar Salesforce lookup magnifying glass icon.

You can also change the display name for the fields in your report as well as set the default columns for your report type. Double-click on a field in the layout to do one or both of these things. By double-clicking on the field, you’ll see a popup window that allows you to change the display name (Display As), and a checkbox (Checked by Default). Marking the checkbox to true will add that particular field as a default column in your report. Click OK. You can repeat with as many fields as you’d like.  

Once you’ve added/arranged/modified all of the necessary fields for your report type, go ahead and click the Save button.  Now, you can go to your Reports tab and create a new report using your new, shiny custom report type. Once it’s ready to be shared with other users, make sure that you come back to it in the Setup menu and mark it as Deployed. Now, any users who have access to the objects included in the report type can access it when creating a new report.

Related Posts