> For the complete documentation index, see [llms.txt](https://docs.gridmate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gridmate.io/product-tour/grids/report-table.md).

# Report Table

Embed tabular, summary and matrix Salesforce reports as tables on any Lightning page.

**GM - Report Table** is a powerful GridMate component that allows users to embed **Salesforce reports** including **Tabular**, **Summarized**, and **Matrix** formats directly onto any **Lightning page** (Home, App, or Record page). With support for advanced features like **row and column groupings**, **grand totals**, and **custom display options**, it offers a highly **interactive** and **configurable** way to surface business critical data.

By default, Salesforce Lightning only supports displaying **report charts**, not raw tabular data. **GridMate fills this gap** by enabling users to view full report tables directly in the Lightning Experience, empowering teams to make data driven decisions faster and more efficiently.

In this tutorial, we will setup **GM - Report Table** component to display an Opportunity summarized report on a home page. Below is a quick demo on how to configure it 👇.

{% embed url="<https://youtu.be/mhLOHI8zjF8>" %}
GRIDMATE - REPORT TABLE
{% endembed %}

{% hint style="success" %}
If the component is used on a record page, the report can be filtered on the current record Id using **Filter** property.

Below is an example to filter opportunities report based on the current account.

```json
{ "ACCOUNT_ID": { "value": "$recordId" } }
```

{% endhint %}

👋 **Note** that Salesforce Reports doesn't always use the field API name for filtering. You can find the field name to use by following the instructions below.

Execute the code below using the [Executing Anonymous Apex Code](https://help.salesforce.com/s/articleView?id=sf.code_dev_console_execute_anonymous.htm\&type=5) 👇

```java
Report r = [
    SELECT Id, Name, DeveloperName
    FROM Report
    WHERE DeveloperName = 'Developer_Name'
    Limit 1
];

Reports.ReportMetadata reportMetadata = Reports.ReportManager.describeReport(r.Id).getReportMetadata();

System.debug(JSON.serialize(reportMetadata));
```

In our example Developer Name = '**Closed\_Opportunities\_ode**'

For better vision, copy the JSON **log** into the [GridMate playground](https://gridpal.my.site.com/s/playground) and you will find the columns on the **reportFilters** attribute.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FhsjYjmlGaCkXkriwz0T0%2FScreenshot%202023-12-13%20at%2011.45.03.png?alt=media&amp;token=686bb900-8fb5-417f-b596-c552f9bc219d" alt=""><figcaption></figcaption></figure>

## Matrix Report

In this tutorial, we will setup **GM - Report Table** component to display an Opportunity Matrix report on the opportunity record page. Below is a quick demo on how to configure it 👇.

{% embed url="<https://youtu.be/DTW4STEWa0U>" %}

## Next steps

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Pivot Grid</strong></td><td>Summarize and edit time series records as a pivot table.</td><td><a href="https://docs.gridmate.io/product-tour/grids/pivot-grid-in-action.md">Pivot Grid</a></td></tr><tr><td><strong>Apex Data Grid</strong></td><td>Show rows returned by an Apex class in a grid.</td><td><a href="https://docs.gridmate.io/product-tour/grids/apex-data-grid.md">Apex Data Grid</a></td></tr><tr><td><strong>GM - Report Table</strong></td><td>Every property of the component.</td><td><a href="https://docs.gridmate.io/package-reference/components-library/grids/gm-report-table.md">GM - Report Table</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.gridmate.io/product-tour/grids/report-table.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
