# Feature COSTS-41 - Export cost query as timesheet PDF

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

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 15.2.0 |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Use cases

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

| ID | Type | Subject | Status | Assignee | Target versions | Spent time | Module |
| --- | --- | --- | --- | --- | --- | --- | --- |
| OP-16407 | Bug | Having a custom logo for the PDF export leads to the timesheet export failing | closed |  | 15.2.0 |  |  |
| COSTS-49 | Bug | Excessive n+1 queries when loading timesheet data | closed |  | 15.2.0 |  |  |

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Build Number |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Andrej Sandorf |
| Product manager |  |
| Feature Lead |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**As a** project controller

**I want to** export nicely styled time sheets

**So that I** don't have to create the PDF files manually.

**Acceptance criteria**

  - PDF is exported from the cost report view

  - Time column is only displayed if admin setting `allow_tracking_start_and_end_times` is active

  - Only the filtered time entries are exported.

  - The grouping options in the web view are ignored.

  - PDF is styled according to <https://www.figma.com/design/FdU4mgz2EkJQTQSvzojPRi/Time-and-costs-reports?node-id=1-2>  
    (slight changes which were talked about in the stream weekly call: \* smaller table font size  \* no ellipsing in wp subject cell)

  - If an entry has its end time on a different day than the start date, it is indicated by a (+days), e.g. "23:00 - 04:00 (+1d)"

  - Cover page  
    Body: "OpenProject"  
    "Cost query name"  
    "Range of dates in cost query"  
    "Exporting user name"  
    Footer: "Export date time"

  - Pages  
    H1: "Cost query name"  
    Grouped by users:  
    H2: "User name"  
    Tables: (see Figma)  
    Footer: "Export date" "Page number/Total page number" "Cost query name"
