# Bug COSTS-196 - When not rendering a column or row, we do not show any headers in Cost Report

Project: Stream Time & Costs
Status: closed
URL: https://community.openproject.org/work_packages/COSTS-196

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Costs and budgets |
| Target versions | 18.0.0 |
| Observed in versions | 17.0.0 |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Klaus Zanders |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

*Was found by <mention class="mention" data-id="87" data-type="user" data-text="@Jens Ulferts">@Jens Ulferts</mention> while checking the fix for* <mention class="mention" data-id="83486" data-type="work_package" data-text="##SPAR-288" data-display-id="SPAR-288">\#\#SPAR-288</mention>.

1.  Go to a cost report

2.  Add one or more group bys for rows **OR** columns (e.g. "Date (Spent)" and "Work package"), leave the other axis empty

3.  Press Apply

### What is the buggy behavior?

  - The report table has no header for the row dimensions. Above the row labels there is only an empty, thin header row, so it's not clear which column holds which dimension (e.g. date vs. work package).

  - The same gap exists in every pivot report: the top-left corner of the table is always blank, even when both rows and columns are configured. It's most noticeable in a rows-only report, though, because the whole header is empty.

  - This isn't a regression of the cost report rewrite. 17.9 renders the table the same way.

### What is the expected behavior?

  - Each grouped dimension should be labeled in the table header:
    
      - Row dimensions get a label above their column (e.g. "Date (Spent)" | "Work package"). In a rows-only report this label row replaces the empty header row.
    
      - Column dimensions get a label to the left of their header row (e.g. "Date (Spent)" next to the dates, "Work package" next to the work packages).

### Screenshots and other files

<figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="https://private-user-images.githubusercontent.com/617519/707851455-32a5963c-13a6-46cc-8109-87e088cbdad5.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTQ4NDM5ODMsIm5iZiI6MTc5NDg0MzY4MywicGF0aCI6Ii82MTc1MTkvNzA3ODUxNDU1LTMyYTU5NjNjLTEzYTYtNDZjYy04MTA5LTg3ZTA4OGNiZGFkNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYxMTE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MTExNlQxNTQxMjNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jNTdlZGY3NDNiMTMwMGZiMDZkZTg1NDZjNTU2YzQ0NzkxNTI5ZmM3YjY5YjE2ZjM1OGUzM2MxOTliZmI5YTgwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.yXjMvXD-1LfEEwU5Odm2XKc0ckV8Qg0uLlRVMZU0l88" alt="image"></div></figure></td><td class="op-uc-table--cell"><figure class="image op-uc-figure"><div class="op-uc-figure--content"><img class="op-uc-image" src="https://private-user-images.githubusercontent.com/617519/707852767-888598b8-f50a-4ab2-9ccf-16f0204629a1.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTQ4NDM5ODMsIm5iZiI6MTc5NDg0MzY4MywicGF0aCI6Ii82MTc1MTkvNzA3ODUyNzY3LTg4ODU5OGI4LWY1MGEtNGFiMi05Y2NmLTE2ZjAyMDQ2MjlhMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYxMTE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MTExNlQxNTQxMjNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01YTZjMjEyNjEyZTAzM2FiNDA0NjgwMjcyNTBjMjhlYThmOGZhNTM5MzNlOGQ0YTVjYjllMDBiYzc0NDUzN2I0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.ODPNaMbNePrij5yeQnQ8-jDcaqq2X-66A3E9-UPEIKw" alt="image"></div></figure></td></tr></tbody></table></figure>

This also uncovered, that when we are grouping on both axis, we are not showing a header for the grouped rows:

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/927003/content">

<br>
