
<FormatHero
  title="Data reports written in Markdown."
  format="report"
  description="Charts and tables next to the text that explains them, in HTML and in paged PDF."
  actions={[
    { label: "Read a report", href: "/gallery" },
  ]}
>
  <FormatVignette format="report" />
</FormatHero>

**Récit report** turns a Markdown story and its data files into a report. Every number on the page
comes from the data, never from the text: change the CSV, rebuild, and the prose, the charts and the
tables follow. The report below is one, compiled from
[`examples/report-quarterly`](https://github.com/vguerand/recit/tree/main/examples/report-quarterly).

<StoryEmbed slug="report/quarterly" />

<SourceFile deck="report/quarterly" title="examples/report-quarterly/quarterly.story.md" />

<PageSection tone="surface" label="The report format">

## The report format

<FeatureGrid cols={3}>
  <FeatureCard title="Numbers from the data" description="`:value` computes a sum, an average or a growth from a CSV, JSON or YAML source at build time." href="/report/from-data" />
  <FeatureCard title="Charts without a DOM" description="`::chart` draws a line, bar, area, dot, heatmap, scatter or map chart as SVG during the build, with the data table under it." href="/report/from-data" />
  <FeatureCard title="One source, two outputs" description="The same story gives a continuous web page with its table of contents and a tagged PDF." href="/report/pdf" />
  <FeatureCard title="Report to deck" description="`recit convert --to deck` makes slides of a report, one per section, the data directives kept." href="/report/report-to-deck" />
  <FeatureCard title="Typed JSON twin" description="Every report has a typed JSON form, checked by its schema and convertible both ways." site="docs" href="/formats/report" />
  <FeatureCard title="MCP server" description="`describe_data` shows an agent the columns of a source before it writes a `:value`." site="docs" href="/formats/report" />
</FeatureGrid>

</PageSection>

<PageSection tone="tint" label="Start a report">

## Start a report

<TutorialSteps>
  <TutorialStep title="Create a report" duration="10 s">
    `recit init --format report` writes a starter `report.md` and its `data/sample.csv`.

    ```bash
    npx recit init report.md --format report
    ```

  </TutorialStep>
  <TutorialStep title="Preview with live reload" duration="1 min">
    `recit dev` shows the page and refreshes it when the story or a data file changes.

    ```bash
    npx recit dev report.md
    ```

  </TutorialStep>
  <TutorialStep title="Build and print" duration="30 s">
    `recit build` writes a static page; `recit export --to pdf` prints the same report.

    ```bash
    npx recit build report.md && npx recit export --to pdf report.md
    ```

  </TutorialStep>
</TutorialSteps>

The full syntax is specified on [docs.recit.dev](https://docs.recit.dev/formats/report).

</PageSection>
