model-report-form

Build report screens with print and Excel export by extending the ReportBase class.

1|Updated Jun 25, 2026
One-click install
npx skills add https://github.com/IgorAIvanov/altera03 --skill model-report-form-igoraivanov
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-report-form
Source: https://github.com/IgorAIvanov/altera03/tree/main/skills/src/model-report-form
Command: npx skills add https://github.com/IgorAIvanov/altera03 --skill model-report-form-igoraivanov

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building report screens (turnover sheets, account cards, register listings) normally means hand-writing toolbars, print logic, and Excel export for every report. This Skill shows how to get all of that for free by extending the shared ReportBase class, so you only write the query and the table markup. ## Core Features & Use Cases - Zero-config print and Excel export: ReportBase owns the sticky toolbar (Refresh / Print / Excel), the print header, and the .xlsx build — the subclass only declares the model, title, buildReport(), and renderBody(). - Generated SQL wrapper: deno task sql:gen generates the index wrapper from the filters schema (filter parsing, required-filter refusal, $filters echo), leaving only the hand-written data query in db/<report>.sql. - Filter contract and drill-down: filters live in $root.$filters as {id, name} reference objects, and tab.open params land directly in another report's filters for drill-down navigation. - Use Case: Create a turnover balance report with organization and period filters, a two-level table header, totals in tfoot, and row-click drill-down into an account card — with print and Excel working immediately. ## Quick Start Ask the AI to create a turnover balance report screen extending ReportBase with organization and period filters, a hand-written SQL data function, and drill-down to the account card report.

Frequently Asked Questions about model-report-form

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add print and Excel export to a report screen?

Extend the ReportBase class and declare only the model, reportTitle, buildReport(), and renderBody() members. The base class owns the toolbar, window.print() wiring, and the .xlsx build, so print and export work with zero configuration over the rendered table.

How do report filters work with the generated SQL wrapper?

Filters live in $root.$filters as {id, name} reference objects and are sent as a nested filters payload. The sql:gen-generated index wrapper parses them, refuses when a required filter is missing, echoes $filters back with labels, and calls your hand-written data function.

Why does my Excel export show numbers as text?

The export reads the rendered table markup, and numeric cells need the tabular-nums class to be recognized as numbers. Apply text-right tabular-nums to money and quantity cells, but never to account codes, which would lose leading zeros.

Why is my report body blurred with a Parameters changed notice?

The base class marks the report stale when a filter changes after the report was built, blurring the body and offering a Rebuild button. This prevents showing figures computed for old filters under a new period, and the mark clears when the index command returns.

When should I override hasData in a report?

Override hasData when an empty row list is still a meaningful answer, such as an account card with an opening balance but no movements in the period. The same flag also enables Print and Excel, and renderBody is only called when hasData is true.