Two fixes needed together to make the new 3-page เอกสารแนบ ร.1 template
actually render:
1. rmutr_report keeps its own separate copy of the form_1_2 C# model
(Models/RoReport/form_1_2.cs), which never got the New2570-spec
fields (division_name, request_count, overall_reason, signer_*,
approver_*) or the form_1_2_positions child list that rmutr-api's
model already has. FastReport's RegisterData binds by reflecting
the actual runtime object, so any Dictionary column not present on
this local class silently fails to compile ("does not exist in
current context") for every field on it.
2. Nested BusinessObjectDataSource fields must be referenced by their
full dotted path from the report root ([form_1_2.form_1_2_positions.
field]), not the bare child name ([form_1_2_positions.field]) —
confirmed against another working report (academic_position.frx)
in this same codebase that uses the identical nesting pattern
correctly.
Verified locally: report now compiles and reaches PDF export (the
only remaining local failure is a NullReferenceException in libgdiplus
font handling specific to this macOS dev machine, unrelated to the
report itself — production runs Linux where this already works for
every other report using TH Sarabun New).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0153wBt23EjW125ZsADwWVAs
Add is_reference_section flag to header_data/detail_kpi_data so the
kpi_performance_result and detail_kpi Excel exports render the 4
reference-indicator sections (วิสัยทัศน์/ค่านิยม/เอกลักษณ์/อัตลักษณ์)
with their bare category name instead of a "ประเด็นยุทธ์ศาสตร์ที่ N"
prefix, and skip them in the real strategic-issue numbering.
Mirrors the existing indicator table layout for the 4 new reference
sections coming from rmutr-api (unit, target value, 3 responsible-role
columns), reusing the same 8-column styling as the strategic indicators.
Replace static computed values for F/H/J/L/N/P/R with FormulaA1 cell
formulas (=B-D, =(F*10)/100, etc.) so the exported report is auditable
and recalculates in Excel, matching a reference ร15.xlsx. P/R now use
the per-row contribution/framework percent passed from rmutr-api
instead of a fixed 40%.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KhYYmBPw4LhYXoDnTNz2xV
FRX template references [durable_articles_three.subject] but the
model was missing the property, causing FastReport binding to fail
and the report endpoint to return 500.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>