---
schema_version: "1"
id: 763741d61f9fe4cbbdb437f502a9c0a02e1b4f65e103903974b73b951cbb09ec
title: DetailColumn Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_reports_detailcolumn.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_detailcolumn.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4bdb775f4697406718a71576024591c19abdd433bd54cc0d52a1ed9cab9abd15
description: Contains methods for describing fields that contain detailed data. Detailed data fields are also listed in the report metadata.Returns the unique API name of the detail column field.Returns the localized display name of a standard field, the ID of a custom field, or the API name of a bucket field that has detailed data.Returns the data type of a detail column field.
---
# DetailColumn Class

Contains methods for describing fields that contain detailed data. Detailed data fields are also listed in the report metadata.

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

## DetailColumn Instance Methods

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

- **[getName()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_detailcolumn.htm#apex_Reports_DetailColumn_getName)**  
    Returns the unique API name of the detail column field.
- **[getLabel()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_detailcolumn.htm#apex_Reports_DetailColumn_getLabel)**  
    Returns the localized display name of a standard field, the ID of a custom field, or the API name of a bucket field that has detailed data.
- **[getDataType()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_reports_detailcolumn.htm#apex_Reports_DetailColumn_getDataType)**  
    Returns the data type of a detail column field.

### getName()

Returns the unique API name of the detail column field.

#### Syntax

public String getName()

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

### getLabel()

Returns the localized display name of a standard field, the ID of a custom field, or the API name of a bucket field that has detailed data.

#### Syntax

public String getLabel()

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

### getDataType()

Returns the data type of a detail column field.

#### Syntax

public Reports.ColumnDataType getDataType()

#### Return Value

Type: [Reports.ColumnDataType](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_enum_reports_columndatatype.htm "The Reports.ColumnDataType enum describes the type of data in a column. It is returned by the getDataType method.")