---
schema_version: "1"
id: 0db5f61163a0a0bff801ccd85f36bcca83f56883776a1775a1502b90cc153700
title: ReportFact Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_reports_reportfact.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportfact.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 7f5ca0e01ce47e9dfa0002f473293d6c0248933af1d7a1af4e5d2d7b3a0dd701
description: Contains the fact map for the report, which represents the report’s data values.Returns summary-level data for a report, including the record count.Returns the unique identifier for a row or column grouping. This identifier can be used to index specific data values within each grouping.
---
# ReportFact Class

Contains the fact map for the report, which represents the report’s data values.

## Namespace

[Reports](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Reports.htm "The Reports namespace provides classes for accessing the same data as is available in the Salesforce Reports and Dashboards REST API.")

## Usage

ReportFact is the parent class of ReportFactWithDetails and ReportFactWithSummaries. If includeDetails is true when the report is run, the fact map is a ReportFactWithDetails object. If includeDetails is false when the report is run, the fact map is a ReportFactWithSummaries object.

## ReportFact Methods

The following are methods for ReportFact. All are instance methods.

- **[getAggregates()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportfact.htm#apex_Reports_ReportFact_getAggregates)**  
    Returns summary-level data for a report, including the record count.
- **[getKey()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportfact.htm#apex_Reports_ReportFact_getKey)**  
    Returns the unique identifier for a row or column grouping. This identifier can be used to index specific data values within each grouping.

### getAggregates()

Returns summary-level data for a report, including the record count.

#### Syntax

public LIST<Reports.SummaryValue> getAggregates()

#### Return Value

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_methods_system_list "Contains methods for the List collection type.")<[Reports.SummaryValue](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_summaryvalue.htm#apex_class_reports_summaryvalue "Contains summary data for a cell of the report.")\>

### getKey()

Returns the unique identifier for a row or column grouping. This identifier can be used to index specific data values within each grouping.

#### Syntax

public String getKey()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")