Newer Version Available

This content describes an older version of this product. View Latest

Report

Represents a report, a set of data that meets certain criteria, displayed in an organized way. Access is read-only. This object is available in API version 20.0 and later.

Supported Calls

describeSObjects(), query(), retrieve(), search()

Fields

Field Details
Description
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The description of the report. Limit: 255 characters.
DeveloperName
Type
string
Properties
Filter, Group, Sort
Description
Required. The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your organization. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object’s name in a managed package and the changes are reflected in a subscriber’s organization. Label is Report Unique Name.

When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record.

Note

Format
Type
picklist
Properties
Filter, Group, Sort
Description
Required. Indicates the format of the report. This field is available in API version 34.0 and later. Can have one of these values:
  • Tabular for reports in that format. The label is Tabular.
  • Summary for reports in that format. The label is Summary.
  • Matrix for reports in that format. The label is Matrix.
  • Multiblock for reports in joined format. The label is Joined.
IsDeleted
Type
boolean
Properties
Defaulted on create, Filter
Description
Indicates whether the object has been moved to the Recycle Bin (true) or not (false). Label is Deleted.
LastReferencedDate
Type
date
Properties
Filter, Nillable, Sort, Update
Description
The timestamp for when the current user last viewed a record related to this record.
LastRunDate
Type
dateTime
Properties
Filter, Nillable, Sort
Description
Returns the date the report was last run. Label is Last Run.
LastViewedDate
Type
date
Properties
Filter, Nillable, Sort, Update
Description
The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.
Name
Type
string
Properties
Filter, Group, Sort
Description
Required. The report label used in the user interface.
NamespacePrefix
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The namespace prefix associated with this object. Each Developer Edition organization that creates a managed package has a unique namespace prefix. Limit: 15 characters. You can refer to a component in a managed package by using the namespacePrefix__componentName notation.

The namespace prefix can have one of the following values:

  • In Developer Edition organizations, the namespace prefix is set to the namespace prefix of the organization for all objects that support it. There is an exception if an object is in an installed managed package. In that case, the object has the namespace prefix of the installed managed package. This field’s value is the namespace prefix of the Developer Edition organization of the package developer.
  • In organizations that are not Developer Edition organizations, NamespacePrefix is only set for objects that are part of an installed managed package. There is no namespace prefix for all other objects.

This field can’t be accessed unless the logged-in user has the “Customize Application” permission.

OwnerId
Type
reference
Properties
Filter
Description
The ID of the user who currently owns this report.

Usage

Use the report object to get report metadata. Query, search, or retrieve specific metadata on reports. Report object fields are read-only.

Sample

In this example, a SOQL query returns reports that contain the name “sales” and are listed by their developer names, format, ID, and report name.