---
schema_version: "1"
id: 99fa8a5536d6e7cab3e730f05fe8332cd450f840c630ee39410c8584c7001263
title: ReportInstance Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_reports_reportinstance.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportinstance.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 16e010884d97e5de98b726e19d9accf70db8c41bac636c840ecb1d1925297361
description: Returns an instance of a report that was run asynchronously. Retrieves the results for that instance.Returns the date and time when the instance of the report finished running. The completion date is available only if the report instance ran successfully or couldn’t be run because of an error. Date and time information is in ISO-8601 format.Returns the unique ID for an instance of a report that was run asynchronously.Returns the ID of the user who created the report instance.Returns the unique ID of the report this instance is based on.Retrieves results for an instance of an asynchronous report. When you request your report, you can specify whether to summarize data or include details.Returns the date and time when an instance of the report was run. Date and time information is in ISO-8601 format.Returns the status of a report.
---
# ReportInstance Class

Returns an instance of a report that was run asynchronously. Retrieves the results for that instance.

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

## ReportInstance Methods

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

- **[getCompletionDate()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportinstance.htm#apex_Reports_ReportInstance_getCompletionDate)**  
    Returns the date and time when the instance of the report finished running. The completion date is available only if the report instance ran successfully or couldn’t be run because of an error. Date and time information is in ISO-8601 format.
- **[getId()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportinstance.htm#apex_Reports_ReportInstance_getId)**  
    Returns the unique ID for an instance of a report that was run asynchronously.
- **[getOwnerId()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportinstance.htm#apex_Reports_ReportInstance_getOwnerId)**  
    Returns the ID of the user who created the report instance.
- **[getReportId()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportinstance.htm#apex_Reports_ReportInstance_getReportId)**  
    Returns the unique ID of the report this instance is based on.
- **[getReportResults()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportinstance.htm#apex_Reports_ReportInstance_getReportResults)**  
    Retrieves results for an instance of an asynchronous report. When you request your report, you can specify whether to summarize data or include details.
- **[getRequestDate()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportinstance.htm#apex_Reports_ReportInstance_getRequestDate)**  
    Returns the date and time when an instance of the report was run. Date and time information is in ISO-8601 format.
- **[getStatus()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportinstance.htm#apex_Reports_ReportInstance_getStatus)**  
    Returns the status of a report.

### getCompletionDate()

Returns the date and time when the instance of the report finished running. The completion date is available only if the report instance ran successfully or couldn’t be run because of an error. Date and time information is in ISO-8601 format.

#### Syntax

public Datetime getCompletionDate()

#### Return Value

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

### getId()

Returns the unique ID for an instance of a report that was run asynchronously.

#### Syntax

public Id getId()

#### Return Value

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

### getOwnerId()

Returns the ID of the user who created the report instance.

#### Syntax

public Id getOwnerId()

#### Return Value

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

### getReportId()

Returns the unique ID of the report this instance is based on.

#### Syntax

public Id getReportId()

#### Return Value

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

### getReportResults()

Retrieves results for an instance of an asynchronous report. When you request your report, you can specify whether to summarize data or include details.

#### Syntax

public Reports.ReportResults getReportResults()

#### Return Value

Type: [Reports.ReportResults](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_reportresults.htm#apex_class_reports_reportresults "Contains the results of running a report.")

### getRequestDate()

Returns the date and time when an instance of the report was run. Date and time information is in ISO-8601 format.

#### Syntax

public Datetime getRequestDate()

#### Return Value

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

### getStatus()

Returns the status of a report.

#### Syntax

public String getStatus()

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

#### Usage

- New if the report run was recently triggered through a request.
- Success if the report ran.
- Running if the report is being run.
- Error if the report run failed. The instance of a report run can return an error if, for example, your permission to access the report was removed after you requested the run.