Create Reports with the Report Builder
When you create a report in Salesforce, the criteria you enter is essentially a question you’re asking, and the results returned are the answer. But in order to ask a question, you have to speak the database’s language. Good news! Salesforce comes with a built-in translator, allowing you to ask your database all the questions you want through a point-and-click interface. Meet the drag-and-drop report builder, your way to get the answers you need about your data.
The first thing you need to do is make sure you’ve enabled the report builder. New organizations automatically get the latest version of report builder. For existing organizations, you may need to take steps to enable the drag-and-drop report builder.
To enable the report builder for all users, from Setup, enter Reports and Dashboard Settings in the Quick Find box, then select Reports and Dashboard Settings. Review the Report Builder Upgrade section of the page, and then click Enable. If you don’t see the button, report builder has been enabled for your organization. Confirm your choice by clicking Yes, Enable Report Builder for All Users.
Good work! Now you need to open the report builder. But before you do that, you have to select a report type.
Select a Report Type
Choosing the right report type is one of the most important steps in building a report. When you pick a report type, you’re picking the records and fields you’ll be able to see in your report.
At this point, let’s press the pause button and make sure you understand how report types are structured.
Each report type has a primary object and one or more related objects. For standard report types, you will typically see this represented in the report type name. For example, with the 'Contacts & Accounts' report type, 'Contacts' is the primary object and 'Accounts' is the related object. For custom report types, from Setup, enter Report Types in the Quick Find box, then select Report Types to see the primary and related objects. As a best practice, consider following the standard report type naming convention when creating custom report types.
- Primary object with related object—Records returned are only those where the primary object has at least one related object record. In our example of ‘Contacts & Accounts’, the only records that would be displayed on the report would be ‘Contacts’ that have at least one related ‘Account’ record.
- Primary object with or without related object—Records returned are those where the primary object may or may not have a related object record. If we were to create a custom report type ‘Contacts with or without Accounts’, then ‘Contacts’ would be displayed whether or not they have a related ‘Account’ record. You can have up to four related objects, and each can have the “with” or “with or without” distinction.
Pay close attention to the primary object and the related object criteria when you’re selecting a report type. Don’t see the fields you want? You may need to create a new custom report type, or adjust an existing custom report type to add or hide fields.
Get to know the Drag-and-Drop Report Builder
Using the drag-and-drop report builder, you can create reports with the criteria, fields, filters, groupings, and charts you need.
Check out this short video to learn more about how the report builder works.
Don’t like videos? Check out this short summary instead.
Just like the name implies, the drag-and-drop report builder allows you to create reports by dragging and dropping fields from the fields pane  onto the preview pane . The filters pane  is where you can enter additional criteria to limit your results. In the example above, we’re filtering by a specific Account Owner, Type, and Billing State/Province.
In the next section, we’ll dive into how you can use filters to get specific results.
When you’re using the report builder to ask a question about your data, filters and filter logic allow you to get more specific, and row limits help you limit the answer you receive. First, let’s take a high-level look at these features, and then we’ll walk you through how to build a filter.
Now that you’ve got that down, let’s build a filter. In this example, we'll build a tabular report, which is the default report format. We'll cover report formats in more detail in the next unit.
- Go to the Reports tab and click on New Report .
- Select the ‘Accounts’ report type and click Create.
- In the filters pane, click Add and select Field Filter.
- Choose a field from the first drop-down list. For this example, let’s choose Type.
- Set the filter operator to Equals.
- Click the lookup icon next to the third field, select the value Customer - Direct , and click OK.
- For the Date Field, select Created Date and set the range to All Time.
Nice job! You’ve just created a report filter that shows all of your Accounts where the Type = Customer - Direct. Click Run Report to see your results. Please note, depending on which org you’re using to run through this tutorial, you may or may not see data in your report at runtime.
Here’s a handy shortcut. When creating a filter, try dragging a field from the fields pane to the filters pane. Voilà! You’re ready to build your next filter. You can also use the type-ahead feature to locate a field. You’ve got options!
In the above example, we used the ‘Equals’ operator to create our filter, however there are a number of operators you can use in building your reports. However, a word of caution: Watch your performance carefully when using ‘Not Equals’ as an operator. The full list of operators can be found here: https://help.salesforce.com/HTViewHelpDoc?id=filter_operators.htm.
Use Cross-Object Filters
Now that you’ve built a filter, let’s take this to the next level with cross-object filters, or “cross filters.” These allow you to extend your report types to objects related to the original objects defined in the report type. Cross filters help you fine tune your results, without writing code or using formulas. The most common use case is exception reporting. Here are some examples.
- ‘Stale Opportunities’ - Opportunities without activities in the past 30 days
- ‘Orphan Contacts’ - Contacts without Accounts
- ‘Neglected Accounts’ - Accounts with no Opportunities
Check out this short video on cross filters:
Now let’s practice adding a cross filter to a report.
- Go to the Reports tab and click on New Report.
- Let’s select the ‘Contacts & Accounts’ report type and click Create.
- In the filters pane of report builder, click .
- Select a parent object from the drop-down list. Your choice determines which related objects you see in the child object list. For this example, let’s select ‘Contacts’.
- Choose ‘with’ as the operator.
- Select a child object from the drop-down or search by its name. The drop-down list contains all eligible child objects of your selected parent object. For this example, let’s select ‘Opportunities’.
- Optionally add subfilters:
- Click Add Opportunities Filter.
- Select a field. The fields are determined by the child object in the cross filter. For example, if your cross filter is ‘Contacts with Opportunities’, you can use Opportunity fields for your subfilter. For this example, let’s select ‘Stage’ for our subfilter.
- Select ‘Equals’ for the operator.
- Click the lookup icon and select ‘Closed Won’.
- Click OK.
Good work! You’ve created a report that shows Contacts & Accounts, where the Contacts are related to Opportunities that are Closed Won. This kind of report could be used to identify Contacts you might want to invite to a local event for customers. If you add an additional subfilter on Opportunity Amount or Close Date, you can learn more about how big the deal was or when it closed.
Use Filter Logic
Now that you’ve learned how to apply filters to your report, you might want to apply logic, so that you can conditionally apply those filters. Enter filter logic, which allows you to specify conditions for your filters.
- Account Owner equals Allison Wheeler
- Industry equals Manufacturing
- Annual Revenue greater than 500,000
If you apply filter logic (1 AND 2) OR 3, then you’ll see any manufacturing accounts owned by Allison, or any accounts with a revenue greater than 500,000.
Alternatively, if you apply filter logic 1 AND (2 OR 3), you’ll see accounts owned by Allison that are either in the manufacturing industry or are greater than 500,000.
The following operators are available.
|AND||Finds records that match both values.|
|OR||Finds records that match either value.|
|NOT||Finds records that exclude values.|
To add filter logic, clickfrom the filters pane.