---
schema_version: "1"
id: e7b8a6e072e04db815142ae00af360b32ab1349ccc24fd45098985c7878cc6fc
title: ReportFactWithDetails Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_reports_reportfactwithdetails.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportfactwithdetails.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 37ec63c8b95e48755604adde326fdbff309ff76d1692c6b2c824f5cdf5e151ab
description: Contains the detailed 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.Returns a list of detailed report data in the order of the detail columns that are provided by the report metadata.
---
# ReportFactWithDetails Class

Contains the detailed 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

The ReportFactWithDetails class extends the ReportFact class. A ReportFactWithDetails object is returned if includeDetails is set to true when the report is run. To access the detail values, you’ll need to cast the return value of the ReportResults.getFactMap method to a ReportFactWithDetails object.

## ReportFactWithDetails Methods

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

- **[getAggregates()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportfactwithdetails.htm#apex_Reports_ReportFactWithDetails_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_reportfactwithdetails.htm#apex_Reports_ReportFactWithDetails_getKey)**  
    Returns the unique identifier for a row or column grouping. This identifier can be used to index specific data values within each grouping.
- **[getRows()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportfactwithdetails.htm#apex_Reports_ReportFactWithDetails_getRows)**  
    Returns a list of detailed report data in the order of the detail columns that are provided by the report metadata.

### 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.")

### getRows()

Returns a list of detailed report data in the order of the detail columns that are provided by the report metadata.

#### Syntax

public LIST<Reports.ReportDetailRow> getRows()

#### 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.ReportDetailRow](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportdetailrow.htm#apex_class_reports_reportdetailrow "Contains data cells for a detail row of a report.")\>