# Common Authoring Errors
Read this when a generated `.report-meta.xml` is rejected during deployment or fields don't appear in the report. Use these to validate the authored XML before handing it off; deployment itself is outside this skill's scope.
| Error | Cause | Fix |
|-------|-------|-----|
| `Invalid report type 'X'` | Report type doesn't exist or isn't deployed in the target org | Verify the report type API name. For custom report types, ensure `true` is set. Use `platform-custom-report-type-generate` skill to create if missing |
| `Invalid field 'X' for report type 'Y'` | Column name not recognized for the report type — used raw field API name instead of platform column name | Use platform column names (e.g. `ACCOUNT_NAME` not `Account.Name`). For custom fields, use `ObjectApiName.FieldApiName__c`. Use `get_metadata_type_shape` MCP tool to discover valid column names |
| `Grouping field 'X' not found in columns` | A `` or `` field is not also listed as a `` entry | Add the grouping field as a `` block |
| `Chart not valid for Tabular format` | `` element present on a Tabular report | Remove the chart or change format to `Summary` or `Matrix` |
| `Summary report requires at least one grouping` | Format is `Summary` but no `` is defined | Add at least one `` block or change format to `Tabular` |
| `Matrix report requires row and column groupings` | Format is `Matrix` but `` or `` is missing | Add both row and column groupings |
| `Tabular report cannot have groupings` | `` or `` present on a Tabular report | Remove groupings or change format to `Summary`/`Matrix` |
| `Invalid filter operation 'X'` | Typo or unsupported operation value | Use a valid operation from `filter-operations.md` |
| `Filter logic references filter N but only M filters exist` | `` references more filters than defined | Ensure filter numbers in the logic match the actual filter count |
| `Report folder not found` | Report file not inside a valid folder directory, or folder metadata file missing | Ensure the file is under `/reports//` (check sfdx-project.json for source path) and a `-meta.xml` exists |
| `Too many cross filters` | More than 3 `` elements | Reduce to 3 or fewer cross-filters |
| `Joined report requires at least 2 blocks` | `` is `Joined` but fewer than 2 `` elements | Add at least 2 block elements |
| `Block format cannot be Tabular` | A `` inside a Joined report has `Tabular` | Change block format to `Summary` or `Matrix` |
| `Aggregate types not valid for Tabular format` | `` specified on a column in a Tabular report | Remove aggregates or change format to `Summary`/`Matrix` |
| `Invalid date interval 'X'` | Typo in `` value inside `` | Use a valid interval constant (e.g. `INTERVAL_CURRENT`, `INTERVAL_CURY`) |
| `Custom start/end date required for INTERVAL_CUSTOM` | Interval is `INTERVAL_CUSTOM` but `` or `` is missing | Add both `` and `` in `YYYY-MM-DD` format |
## Common Pitfalls
### Pitfall 1: Using API Field Names Instead of Platform Column Names
**Wrong:**
```xml
Account.Name
```
**Right:**
```xml
ACCOUNT_NAME
```
Standard fields have specific platform column names (e.g. `OPPORTUNITY_NAME`, `STAGE_NAME`, `CLOSE_DATE`). Custom fields use the format `ObjectApiName.FieldApiName__c`.
### Pitfall 2: Forgetting Grouping Fields in Columns
Every field used in `` or `` must also be present as a `` entry. Missing the column causes the grouping to fail.
### Pitfall 3: Mismatched Format and Structure
| If you want... | Use format | Must have |
|----------------|------------|-----------|
| Flat list | `Tabular` | Only ``, NO groupings |
| Grouped rows | `Summary` | `` + `` |
| Cross-tab | `Matrix` | `` + `` + `` |
| Multi-source | `Joined` | `` elements (2-5), each with own columns/groupings |
### Pitfall 4: Chart Summary Column Syntax
The `` in a chart uses a special syntax for aggregate references:
- `s!AMOUNT` — Sum of Amount
- `a!AMOUNT` — Average of Amount
- `m!AMOUNT` — Max of Amount
- `x!AMOUNT` — Min of Amount
- `RowCount` — Record count
### Pitfall 5: Joined Report Restrictions
- Joined reports do NOT support top-level ``, ``, or `` — everything goes inside `` elements
- Each block must have its own `` — blocks can use different report types
- Blocks align on common grouping fields for cross-block comparison
- Block format must be `Summary` or `Matrix`, never `Tabular`