The lastPdfBytes on a CustomReport is the cached PDF output from the last time you generated the report. Clicking "Download" in Piper serves this stored binary directly, making repeated downloads fast. However, it is important to remember that lastPdfBytes only reflects the data as of lastGeneratedAt — if well data has been updated since then, the download will not include those changes. Unlike ReportVersion records which store a history of every render, CustomReport stores only the most recent PDF, overwriting lastPdfBytes each time you generate.
Technical section
Data model, API, and internals — visible to developers.
