PDF templates / Report

Monthly KPI Report

One-page A4 monthly KPI report with a four-tile stat strip (revenue, gross margin, active customers, churn, each with a vs-last-month delta), a trailing-twelve-month combo chart (revenue bars with gross margin on a right-hand axis), a ranked horizontal bar chart of revenue by product line, a top-customers table with totals and a short commentary panel. Data-driven charts render from each call's data.

First page of the Monthly KPI Report template, rendered with its sample data
report-kpi-monthly.pdfpage 1 of 1

DSL source

The whole template. Learn the language in the template DSL guide.

js
const customerCols = [["Customer", "1fr"], ["Plan", "auto"], ["Seats", "auto", "right"], ["MRR", "auto", "right"]];

const template = doc({ size: "A4", title: "{{title}}", padding: [22, 30, 22, 30] },

  // Masthead
  hdr(
    r({ margin: [0, 0, 0, 5] },
      col("60%",
        s({ "font-size": 8, "font-weight": "bold", color: "#1D4ED8", "letter-spacing": 1.5 }, "{{organization}}"),
      ),
      col("40%", { align: "right" },
        s({ "font-size": 8, color: "#6B7280" }, "{{confidentiality}}"),
      ),
    ),
    hr(0, "#1D4ED8"),
  ),

  r({ margin: [5, 0, 7, 0] },
    col("68%",
      s({ "font-size": 7.5, "font-weight": "bold", color: "#1D4ED8", "letter-spacing": 2 }, "MONTHLY KPI REPORT"),
      s({ "font-size": 19, "font-weight": "bold", color: "#0F172A", "line-height": 1.12, margin: [2, 0, 0, 0] }, "{{title}}"),
      s({ "font-size": 9.5, color: "#475569", margin: [3, 0, 0, 0] }, "{{period}}"),
    ),
    col("32%", { align: "right" },
      s({ "font-size": 7, color: "#6B7280", "font-weight": "bold", "letter-spacing": 1 }, "PREPARED FOR"),
      s({ "font-size": 9, color: "#0F172A", margin: [2, 0, 0, 0] }, "{{preparedFor}}"),
      s({ "font-size": 7, color: "#6B7280", "font-weight": "bold", "letter-spacing": 1, margin: [5, 0, 0, 0] }, "PREPARED ON"),
      s({ "font-size": 9, color: "#0F172A", margin: [2, 0, 0, 0] }, "{{preparedOn}}"),
    ),
  ),

  // KPI stat strip — four tiles, each with a vs-last-month delta
  r({ margin: [0, 0, 6, 0] },
    each("k in kpis",
      col("25%", { padding: [6, 7, 6, 7], "background-color": "#F1F5F9", "border-color": "#1D4ED8", border: [0, 0, 0, 2] },
        s({ "font-size": 7, color: "#64748B", "font-weight": "bold", "letter-spacing": 1 }, "{{k.label}}"),
        s({ "font-size": 16, "font-weight": "bold", color: "#0F172A", margin: [3, 0, 1, 0] }, "{{k.value}}"),
        s({ "font-size": 7.5, color: "#047857", "font-weight": "bold" }, "{{k.delta}}"),
      ),
    ),
  ),

  // Trailing twelve month revenue, with gross margin on a right axis
  chart({
    type: "bar",
    data: "{{monthlyRevenue}}",
    x: "month",
    y: [
      { key: "revenue", label: "Revenue" },
      { key: "margin", label: "Gross margin %", type: "line", axis: "right" },
    ],
    width: 535,
    height: 130,
    title: "Revenue and gross margin — trailing 12 months",
    "x-title": "Month",
    "y-title": "USD",
    "y2-title": "Margin %",
  }),
  gap(6),

  // Revenue by product line, ranked largest first
  chart({
    type: "bar",
    data: "{{revenueByProduct}}",
    x: "product",
    y: [{ key: "revenue", label: "Revenue" }],
    horizontal: true,
    width: 535,
    height: 125,
    title: "Revenue by product line — {{chartPeriod}}",
    "y-title": "USD",
  }),
  gap(6),

  // Top customers
  s({ "font-size": 11, "font-weight": "bold", color: "#0F172A", margin: [0, 0, 3, 0] }, "Top customers by MRR"),
  table(customerCols, "c in customers",
    [["{{c.name}}", "1fr"], ["{{c.plan}}", "auto"], ["{{c.seats | number}}", "auto", "right"], ["{{c.mrr | currency}}", "auto", "right"]],
  ),
  totals([["Total MRR — top accounts", "{{mrrTotal | currency}}", true]], customerCols),
  gap(6),

  // Commentary
  r({ padding: [8, 10, 8, 10], "background-color": "#F8FAFC", "border-color": "#E2E8F0" },
    col("100%",
      s({ "font-size": 7.5, "font-weight": "bold", color: "#1D4ED8", "letter-spacing": 1.5 }, "COMMENTARY"),
      s({ "font-size": 9, color: "#334155", "line-height": 1.45, margin: [4, 0, 0, 0] }, "{{commentary}}"),
    ),
  ),

  ftrPages("{{organization}} · Monthly KPI Report"),
);

const sampleData = {
  organization: "Northline Studio, Inc.",
  title: "September 2026 Performance",
  period: "Reporting month: 1–30 September 2026",
  preparedFor: "Board of Directors",
  preparedOn: "2 October 2026",
  confidentiality: "Internal — Board Distribution Only",
  kpis: [
    { label: "REVENUE", value: "$138.6k", delta: "+12.4% vs last month" },
    { label: "GROSS MARGIN", value: "72.6%", delta: "+1.8 pts vs last month" },
    { label: "ACTIVE CUSTOMERS", value: "1,284", delta: "+184 vs last month" },
    { label: "MONTHLY CHURN", value: "1.8%", delta: "−0.3 pts vs last month" },
  ],
  monthlyRevenue: [
    { month: "Oct", revenue: 98400, margin: 68.4 },
    { month: "Nov", revenue: 102300, margin: 69.1 },
    { month: "Dec", revenue: 118700, margin: 67.8 },
    { month: "Jan", revenue: 104900, margin: 69.6 },
    { month: "Feb", revenue: 108600, margin: 70.2 },
    { month: "Mar", revenue: 119800, margin: 69.8 },
    { month: "Apr", revenue: 113200, margin: 70.9 },
    { month: "May", revenue: 121500, margin: 71.3 },
    { month: "Jun", revenue: 126900, margin: 70.8 },
    { month: "Jul", revenue: 124300, margin: 71.6 },
    { month: "Aug", revenue: 131800, margin: 70.8 },
    { month: "Sep", revenue: 138600, margin: 72.6 },
  ],
  chartPeriod: "September",
  revenueByProduct: [
    { product: "Platform", revenue: 89100 },
    { product: "Automation", revenue: 34500 },
    { product: "Analytics", revenue: 14000 },
    { product: "Integrations", revenue: 1000 },
  ],
  customers: [
    { name: "Kestrel Logistics", plan: "Enterprise", seats: 320, mrr: 16800 },
    { name: "Ardent Health Group", plan: "Enterprise", seats: 240, mrr: 12480 },
    { name: "Northwind Retail", plan: "Scale", seats: 180, mrr: 9180 },
    { name: "Bluepeak Financial", plan: "Scale", seats: 140, mrr: 7420 },
    { name: "Tidewater Energy", plan: "Growth", seats: 96, mrr: 4980 },
  ],
  mrrTotal: 50860,
  commentary: "September closed at $138.6k, up 12.4% on August and 41% year on year. Growth was led by Platform seat expansion at Kestrel Logistics and the first full month of Automation Suite billing. Gross margin held above 72% despite the EU residency migration. Churn improved to 1.8% as the targeted save motion cleared the legacy Q3-2025 cohort. Watch-item for October: enterprise median time-to-close has drifted from 48 to 56 days.",
};

Sample data

json
{
  "organization": "Northline Studio, Inc.",
  "title": "September 2026 Performance",
  "period": "Reporting month: 1–30 September 2026",
  "preparedFor": "Board of Directors",
  "preparedOn": "2 October 2026",
  "confidentiality": "Internal — Board Distribution Only",
  "kpis": [
    {
      "label": "REVENUE",
      "value": "$138.6k",
      "delta": "+12.4% vs last month"
    },
    {
      "label": "GROSS MARGIN",
      "value": "72.6%",
      "delta": "+1.8 pts vs last month"
    },
    {
      "label": "ACTIVE CUSTOMERS",
      "value": "1,284",
      "delta": "+184 vs last month"
    },
    {
      "label": "MONTHLY CHURN",
      "value": "1.8%",
      "delta": "−0.3 pts vs last month"
    }
  ],
  "monthlyRevenue": [
    {
      "month": "Oct",
      "revenue": 98400,
      "margin": 68.4
    },
    {
      "month": "Nov",
      "revenue": 102300,
      "margin": 69.1
    },
    {
      "month": "Dec",
      "revenue": 118700,
      "margin": 67.8
    },
    {
      "month": "Jan",
      "revenue": 104900,
      "margin": 69.6
    },
    {
      "month": "Feb",
      "revenue": 108600,
      "margin": 70.2
    },
    {
      "month": "Mar",
      "revenue": 119800,
      "margin": 69.8
    },
    {
      "month": "Apr",
      "revenue": 113200,
      "margin": 70.9
    },
    {
      "month": "May",
      "revenue": 121500,
      "margin": 71.3
    },
    {
      "month": "Jun",
      "revenue": 126900,
      "margin": 70.8
    },
    {
      "month": "Jul",
      "revenue": 124300,
      "margin": 71.6
    },
    {
      "month": "Aug",
      "revenue": 131800,
      "margin": 70.8
    },
    {
      "month": "Sep",
      "revenue": 138600,
      "margin": 72.6
    }
  ],
  "chartPeriod": "September",
  "revenueByProduct": [
    {
      "product": "Platform",
      "revenue": 89100
    },
    {
      "product": "Automation",
      "revenue": 34500
    },
    {
      "product": "Analytics",
      "revenue": 14000
    },
    {
      "product": "Integrations",
      "revenue": 1000
    }
  ],
  "customers": [
    {
      "name": "Kestrel Logistics",
      "plan": "Enterprise",
      "seats": 320,
      "mrr": 16800
    },
    {
      "name": "Ardent Health Group",
      "plan": "Enterprise",
      "seats": 240,
      "mrr": 12480
    },
    {
      "name": "Northwind Retail",
      "plan": "Scale",
      "seats": 180,
      "mrr": 9180
    },
    {
      "name": "Bluepeak Financial",
      "plan": "Scale",
      "seats": 140,
      "mrr": 7420
    },
    {
      "name": "Tidewater Energy",
      "plan": "Growth",
      "seats": 96,
      "mrr": 4980
    }
  ],
  "mrrTotal": 50860,
  "commentary": "September closed at $138.6k, up 12.4% on August and 41% year on year. Growth was led by Platform seat expansion at Kestrel Logistics and the first full month of Automation Suite billing. Gross margin held above 72% despite the EU residency migration. Churn improved to 1.8% as the targeted save motion cleared the legacy Q3-2025 cohort. Watch-item for October: enterprise median time-to-close has drifted from 48 to 56 days."
}

Render it with your data

Any API key can render this template by its ID. This call uses the sample data; add a data object to use your own. See the API reference.

bash
curl -X POST https://makespdf.com/api/v1/render \
  -H "Authorization: Bearer $MAKESPDF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"templateId": "report-kpi-monthly"}' \
  -o output.pdf