When creating a custom SugarCRM report, defining your filter(s) is an important step. This excerpt from our eBook, Getting Started with SugarCRM Version 6.x explains how to add filters to your reports.
SugarCRM Report: Define Filters
The Define Filters step is completed for every type of Report. In
this step, you can choose one or more filters. These filters control
which data is shown in your report.
For example, if you are creating a report about Leads and do not want
to include Leads whose Status is Dead, you can do that with a filter.
Filters are selected based on the module where the desired field is located. Once you choose the module in the Related Modules field, a list of available fields for filtering will load in the bottom panel. Click a field to select it.
To continue with the Leads example, the Lead Status field would be in the Leads module. You would select the Leads module in the top panel, then find and click on Status in the bottom panel. When you do, Leads > Status will be added to the Define Filters panel in the center of your screen.
You have several options when setting the filter. In the first
drop-down, define the operator used by the filter (is, is not, is one
of, etc.). For this example, you would select Is Not. The second
drop-down is where you select which field value the operator should use;
in this case, that would be Dead.
The Run-time checkbox determines whether a run-time filter will be
used with this Report. If checked, you will be able to change your
filtering choices (the first two drop-down lists) when viewing the
Report and update it in real-time to see the data that matches your
To remove a filter that you added accidentally, click the red minus symbol at the right end of the line.
You can add multiple filters if you would like to show only data that meets more than one condition. By default, two or more filters are combined with the AND operator, but you can change it to an OR combination using the Select Operator drop-down at the top left corner of the Define Filters panel.
You do not have to apply any filters; if you want your report to use
all of the data records in the selected module, simply continue to the
next step without adding any filters.
To help you get the idea, here is one more filtering example. Let’s say you wanted to generate a list of your current Leads, along with some information such as their phone number and lead status. (You could then print this Report and use it as a to-do list for Leads that you need to contact). In this example, you want to use two filters: you want to show only Leads assigned to you, and you do not want to show Dead leads. To show only Leads assigned to you, select the Assigned to User module on the module file tree; then choose the User Name field from the field list. Then select the Leads module and click the Status field. Change the Status filter to Is Not and Dead. The Assigned to User filter is set to the current user, so that whoever runs the report sees their own Leads listed. The resulting filters panel is shown below:
Looking for more information about creating custom reports in SugarCRM? Technology Advisor’s eBook, Getting Started with SugarCRM Version 6.x, includes step-by-step directions and plenty of examples to help you create your own reports and analyze your CRM data effectively.