Reports & Exports — Forms
Reports & Exports — Forms & Input Specification
Reference technical blueprint: reports.md Slug:
reports· Module #17 · 6 sub-modules · ~8 forms
The unified report-generation service consumed by every other module. PDF (WeasyPrint) · Excel (openpyxl) · CSV · JSON for govt portals. Multi-tenant, fund-segregated, auditor-ready.
Sub-module 1: Run a Report (on-demand)
Form 1.1 — Run Report
Purpose: Pick a registered report and run it for the chosen period / filter. Who fills: Trustee, treasurer, or any role with permission for that report.
| Field | Type | Required | Options / Validation | Default | Help |
|---|---|---|---|---|---|
| Report | Dropdown | Yes | Reports registered for the tenant + grouped by owner-module | — | Search-as-you-type |
| Parameters (dynamic per report): | Render based on report's parameter_schema |
||||
| Period — From | Date | Conditional | — | FY start | If period-bounded |
| Period — To | Date | Conditional | — | Today | — |
| Fund Filter | Multi-select | No | From funds | All | — |
| Branch Filter | Multi-select | No | From branches | All | — |
| Specific Member / Donor | Member-search | No | — | — | If donor-specific |
| Output Format | Dropdown | Yes | PDF · Excel · CSV · JSON (govt) | Per report default | — |
| Email To | Text | No | Comma list | — | If filled, emails the result |
| Save to Cloud Storage? | Checkbox | Yes | — | ☑ | For auditor pickup |
Submit action: Runs report (sync if small, async if large via export-job); writes to report_runs ledger.
Related: Result viewable in Form 1.2 once produced.
Form 1.2 — Report Run History (read-only)
Purpose: Browse past runs of any report.
Display fields: - Run ID, Report Name, Triggered By, Triggered At, Parameters (collapsible JSON), Status, Output URL (signed link), Run Duration, File Size
Sub-module 2: Schedule Reports
Form 2.1 — Schedule a Recurring Report
Purpose: Auto-run a report on cron and dispatch via Comms (e.g. quarterly trustee pack).
| Field | Type | Required | Options / Validation | Default | Help |
|---|---|---|---|---|---|
| Schedule Name | Text | Yes | — | — | e.g. "Quarterly Trustee Pack" |
| Report | Dropdown | Yes | — | — | — |
| Parameters (JSON) | Code editor | No | — | Auto from defaults | — |
| Output Format | Dropdown | Yes | — | — | |
| Cron Expression | Text | Yes | Standard cron, ≥ daily | 0 9 1 1,4,7,10 * |
Quarterly: 9am 1st of Jan/Apr/Jul/Oct |
| Recipients Segment | Dropdown | Yes | From comms segments | Trustees | — |
| Delivery Channels | Multi-select | Yes | Email · Postal | — | |
| Cover-letter Template | Dropdown | No | From comms templates | Default | — |
| Active? | Checkbox | Yes | — | ☑ | — |
Submit action: Creates scheduled_reports row; cron picks it up.
Sub-module 3: Trustee Pack Composer
Form 3.1 — Trustee Pack Customise (one-off)
Purpose: Build a quarterly board-pack — finance summary + KPIs + compliance status + open issues.
| Field | Type | Required | Options / Validation | Default | Help |
|---|---|---|---|---|---|
| Quarter | Dropdown | Yes | Q1-Q4 of FY | Current | — |
| FY | Dropdown | Yes | FY26-27, FY25-26, ... | Current | — |
| Sections to Include | Multi-select | Yes | Finance · Operations · Compliance · HR · Events · Education · Outreach · Open Issues | All | — |
| Fund Coverage | Multi-select | Yes | — | All | Fund-wise breakdown |
| Branch Coverage | Multi-select | Yes | — | All | — |
| Cover Note | Textarea | No | — | — | Editor's note for trustees |
| Logo on Cover | Checkbox | Yes | — | ☑ | — |
| Signed-by | Multi-select | Yes | From staff | Pradhana, Trustee-1 | — |
Submit action: Generates PDF; auto-mails to trustees via Comms; saves to GCS.
Sub-module 4: Statutory Filings (file generators)
Form 4.1 — Government-Portal File Generator
Purpose: Produce upload-ready files for GSTN / TRACES / MHA-FCRA / IT-Form-10B portals.
| Field | Type | Required | Options / Validation | Default | Help |
|---|---|---|---|---|---|
| Regime | Dropdown | Yes | GSTR-1 · GSTR-3B · TDS 24Q (salary) · TDS 26Q (other) · FC-4 (FCRA) · Form 10B (audit) · ITR-7 | — | — |
| Period | Dropdown | Yes | Per regime cadence (Monthly · Quarterly · Annual) | — | — |
| FY | Dropdown | Conditional | If period spans FY | — | — |
| Tenant GSTIN / PAN / FCRA | Read-only | — | Auto-from Statutory Data | — | — |
| Pre-validate | Checkbox | Yes | — | ☑ | Run validation against schema before download |
| Download Format | Dropdown | Yes | JSON (GSTN) · FUV (TRACES) · Excel (MHA) · PDF (Form 10B) | Per regime default | — |
Submit action: Composes file; if pre_validate and validation fails, shows error list. Otherwise produces download. NB: This module produces the file. User uploads it to the govt portal manually.
Sub-module 5: 80G Annual Receipt Generator
Form 5.1 — Generate Annual 80G Receipts (bulk)
Purpose: Issue 80G certificates to all eligible donors for an FY.
| Field | Type | Required | Options / Validation | Default | Help |
|---|---|---|---|---|---|
| FY | Dropdown | Yes | — | Last FY | — |
| Eligible Funds | Multi-select | Yes | Funds covered by 80G registration | General · Annadana · Building | (Auto-from registration) |
| Min Donation Threshold (₹) | Number | No | — | 100 | Skip donors below this |
| Recipient Segment | Dropdown | No | Comms segment for filtering | All eligible | — |
| Dispatch Channels | Multi-select | Yes | Email · Postal | Postal for non-email donors | |
| Email Template | Dropdown | Yes | — | 80G annual default | — |
| Include Donor Wall | Checkbox | Yes | — | ☐ | Add donor-wall snippet to email |
| Dry-run? | Checkbox | Yes | — | ☑ first time | Generates samples, no send |
Submit action: If Dry-run ☑, produces 5 sample PDFs. Else generates per-donor receipt + queues Comms send.
Sub-module 6: Database Export (large async)
Form 6.1 — Trigger Database Export
Purpose: Backup or export-for-migration. Multi-GB; runs async; results in GCS.
| Field | Type | Required | Options / Validation | Default | Help |
|---|---|---|---|---|---|
| Export Kind | Dropdown | Yes | Full DB · Members only · Donations only · Sevas only · Custom Tables | Full DB | — |
| Custom Tables | Multi-select | Conditional | — | — | If Kind=Custom |
| Format | Dropdown | Yes | Excel · CSV bundle (zip) · JSON | Excel | — |
| Encrypt with Password | Password | No | Min 12 chars | — | If filled, ZIPs with AES-256 |
| Notify When Ready | No | — | Self | Sends signed-URL email |
Submit action: Queues as export_job; email arrives when done with signed URL valid 24h.
Workflow
Reports is consumed by every module. Typical flow: a module registers its reports at startup via reports.register_report(...) (e.g. Vitta registers Trial Balance, Members registers Donor List). User picks via Form 1.1 → engine runs → output stored in GCS → user downloads or it's auto-emailed. Schedules (Form 2.1) push outputs via Comms on cron. Statutory file generators (Form 4.1) produce files for manual upload to govt portals — direct e-filing is out of scope.