feat(form_1_2): add New2570 fields to local model, fix report template
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
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
This commit is contained in:
@@ -63,6 +63,45 @@ namespace rmutr_report.Models.RoThree
|
||||
public string budget_year_name_th { get; set; }
|
||||
public List<t_form_1_2_images> form_1_2_images { get; set; }
|
||||
public List<t_form_1_2_images_2> form_1_2_images_2 { get; set; }
|
||||
|
||||
// New2570 spec — header-level
|
||||
public int? request_count { get; set; }
|
||||
public string division_name { get; set; }
|
||||
public string overall_reason { get; set; }
|
||||
|
||||
// New2570 spec — signer (ผู้ขอ)
|
||||
public string signer_type { get; set; }
|
||||
public string signer_name { get; set; }
|
||||
public string signer_position { get; set; }
|
||||
|
||||
// New2570 spec — approver (หัวหน้าหน่วยงาน)
|
||||
public string approver_decision { get; set; }
|
||||
public string approver_reason { get; set; }
|
||||
public string approver_name { get; set; }
|
||||
public string approver_admin_position { get; set; }
|
||||
|
||||
public List<form_1_2_positions> form_1_2_positions { get; set; }
|
||||
}
|
||||
|
||||
public class form_1_2_positions
|
||||
{
|
||||
[Key] public Guid? form_1_2_position_uid { get; set; }
|
||||
public Guid? form_1_2_uid { get; set; }
|
||||
public int? row { get; set; }
|
||||
|
||||
public string old_position_no { get; set; }
|
||||
public string old_position_name { get; set; }
|
||||
public string old_qualification { get; set; }
|
||||
public string old_division_name { get; set; }
|
||||
public string old_workload { get; set; }
|
||||
|
||||
public string new_position_no { get; set; }
|
||||
public string new_position_name { get; set; }
|
||||
public string new_qualification { get; set; }
|
||||
public string new_division_name { get; set; }
|
||||
public string new_workload { get; set; }
|
||||
|
||||
public string reason { get; set; }
|
||||
}
|
||||
|
||||
public class t_form_1_2_images
|
||||
|
||||
@@ -84,22 +84,22 @@
|
||||
<TextObject Name="P1PosListHeading" Top="284.85" Width="718.2" Height="28.35" Text="รายการตำแหน่งที่ขอเปลี่ยนแปลง" Font="TH Sarabun New, 16pt, style=Underline"/>
|
||||
</DataBand>
|
||||
<DataBand Name="P1PositionsList" Top="1013.75" Width="718.2" Height="56.7" DataSource="form_1_2_positions">
|
||||
<TextObject Name="P1PosNo" Width="28.35" Height="28.35" Text="[form_1_2_positions.row]." Font="TH Sarabun New, 16pt, style=Bold"/>
|
||||
<TextObject Name="P1PosNo" Width="28.35" Height="28.35" Text="[form_1_2.form_1_2_positions.row]." Font="TH Sarabun New, 16pt, style=Bold"/>
|
||||
<TextObject Name="P1PosNoLabel" Left="28.35" Width="141.75" Height="28.35" Text="เลขที่ตำแหน่ง" Font="TH Sarabun New, 16pt, style=Bold"/>
|
||||
<TextObject Name="P1PosNo_u" Left="170.1" Top="9.45" Width="122.85" Height="18.9" Border.Lines="Bottom" Border.Style="Dot" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P1PosNoVal" Left="170.1" Width="122.85" Height="28.35" Text="[form_1_2_positions.old_position_no]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P1PosNoVal" Left="170.1" Width="122.85" Height="28.35" Text="[form_1_2.form_1_2_positions.old_position_no]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P1PosNameLabel" Left="302.4" Width="85.05" Height="28.35" Text="ตำแหน่ง" Font="TH Sarabun New, 16pt, style=Bold"/>
|
||||
<TextObject Name="P1PosName_u" Left="387.45" Top="9.45" Width="207.9" Height="18.9" Border.Lines="Bottom" Border.Style="Dot" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P1PosNameVal" Left="387.45" Width="207.9" Height="28.35" Text="[form_1_2_positions.old_position_name]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P1PosNameVal" Left="387.45" Width="207.9" Height="28.35" Text="[form_1_2.form_1_2_positions.old_position_name]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P1PosQualLabel" Top="28.35" Left="170.1" Width="122.85" Height="28.35" Text="ระดับการศึกษา" Font="TH Sarabun New, 16pt, style=Bold"/>
|
||||
<TextObject Name="P1PosQual_u" Left="292.95" Top="37.8" Width="302.4" Height="18.9" Border.Lines="Bottom" Border.Style="Dot" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P1PosQualVal" Left="292.95" Top="28.35" Width="302.4" Height="28.35" Text="[form_1_2_positions.old_qualification]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P1PosQualVal" Left="292.95" Top="28.35" Width="302.4" Height="28.35" Text="[form_1_2.form_1_2_positions.old_qualification]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
</DataBand>
|
||||
</ReportPage>
|
||||
|
||||
<!-- ===================== หน้า 2: แบบฟอร์มรายละเอียด (1 หน้าต่อ 1 อัตรา) ===================== -->
|
||||
<ReportPage Name="Page2" PaperWidth="210" PaperHeight="297" LeftMargin="10" TopMargin="10" RightMargin="10" BottomMargin="10">
|
||||
<DataBand Name="P2Detail" Width="718.2" Height="945" DataSource="form_1_2_positions">
|
||||
<DataBand Name="P2Detail" Width="718.2" Height="945" DataSource="form_1_2_positions" StartNewPage="true">
|
||||
<TextObject Name="P2Note" Width="718.2" Height="28.35" Text="หมายเหตุ หากหน่วยงานไม่แนบเอกสารให้ครบถ้วน อาจไม่ได้รับการพิจารณา" Font="TH Sarabun New, 16pt, style=Underline"/>
|
||||
|
||||
<TextObject Name="P2H1" Top="66.15" Width="718.2" Height="28.35" Text="เหตุผล ความจำเป็น และภาระงานของอัตราที่จะเสนอขอเปลี่ยนชื่อตำแหน่ง" HorzAlign="Center" Font="TH Sarabun New, 16pt, style=Bold"/>
|
||||
@@ -113,37 +113,37 @@
|
||||
<TextObject Name="P2NewNoLabel" Left="359.1" Top="198.45" Width="359.1" Height="28.35" Border.Lines="Left,Right" Text="เลขที่ตำแหน่ง" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldNoLine" Top="226.8" Width="359.1" Height="18.9" Border.Lines="Left,Right,Bottom" Border.Style="Dot" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewNoLine" Left="359.1" Top="226.8" Width="359.1" Height="18.9" Border.Lines="Left,Right,Bottom" Border.Style="Dot" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldNoVal" Top="217.35" Width="359.1" Height="28.35" Text="[form_1_2_positions.old_position_no]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewNoVal" Left="359.1" Top="217.35" Width="359.1" Height="28.35" Text="[form_1_2_positions.new_position_no]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldNoVal" Top="217.35" Width="359.1" Height="28.35" Text="[form_1_2.form_1_2_positions.old_position_no]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewNoVal" Left="359.1" Top="217.35" Width="359.1" Height="28.35" Text="[form_1_2.form_1_2_positions.new_position_no]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
|
||||
<TextObject Name="P2OldNameLabel" Top="245.7" Width="359.1" Height="28.35" Border.Lines="Left,Right" Text="ชื่อตำแหน่ง" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewNameLabel" Left="359.1" Top="245.7" Width="359.1" Height="28.35" Border.Lines="Left,Right" Text="ชื่อตำแหน่ง" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldNameLine" Top="274.05" Width="359.1" Height="18.9" Border.Lines="Left,Right,Bottom" Border.Style="Dot" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewNameLine" Left="359.1" Top="274.05" Width="359.1" Height="18.9" Border.Lines="Left,Right,Bottom" Border.Style="Dot" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldNameVal" Top="264.6" Width="359.1" Height="28.35" Text="[form_1_2_positions.old_position_name]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewNameVal" Left="359.1" Top="264.6" Width="359.1" Height="28.35" Text="[form_1_2_positions.new_position_name]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldNameVal" Top="264.6" Width="359.1" Height="28.35" Text="[form_1_2.form_1_2_positions.old_position_name]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewNameVal" Left="359.1" Top="264.6" Width="359.1" Height="28.35" Text="[form_1_2.form_1_2_positions.new_position_name]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
|
||||
<TextObject Name="P2OldQualLabel" Top="293.4" Width="359.1" Height="28.35" Border.Lines="Left,Right" Text="ระดับการศึกษา" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewQualLabel" Left="359.1" Top="293.4" Width="359.1" Height="28.35" Border.Lines="Left,Right" Text="ระดับการศึกษา" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldQualLine" Top="321.75" Width="359.1" Height="18.9" Border.Lines="Left,Right,Bottom" Border.Style="Dot" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewQualLine" Left="359.1" Top="321.75" Width="359.1" Height="18.9" Border.Lines="Left,Right,Bottom" Border.Style="Dot" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldQualVal" Top="312.3" Width="359.1" Height="28.35" Text="[form_1_2_positions.old_qualification]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewQualVal" Left="359.1" Top="312.3" Width="359.1" Height="28.35" Text="[form_1_2_positions.new_qualification]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldQualVal" Top="312.3" Width="359.1" Height="28.35" Text="[form_1_2.form_1_2_positions.old_qualification]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewQualVal" Left="359.1" Top="312.3" Width="359.1" Height="28.35" Text="[form_1_2.form_1_2_positions.new_qualification]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
|
||||
<TextObject Name="P2OldDivLabel" Top="341.1" Width="359.1" Height="28.35" Border.Lines="Left,Right" Text="สังกัดงาน" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewDivLabel" Left="359.1" Top="341.1" Width="359.1" Height="28.35" Border.Lines="Left,Right" Text="สังกัดงาน" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldDivLine" Top="369.45" Width="359.1" Height="18.9" Border.Lines="Left,Right,Bottom" Border.Style="Dot" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewDivLine" Left="359.1" Top="369.45" Width="359.1" Height="18.9" Border.Lines="Left,Right,Bottom" Border.Style="Dot" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldDivVal" Top="360" Width="359.1" Height="28.35" Text="[form_1_2_positions.old_division_name]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewDivVal" Left="359.1" Top="360" Width="359.1" Height="28.35" Text="[form_1_2_positions.new_division_name]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldDivVal" Top="360" Width="359.1" Height="28.35" Text="[form_1_2.form_1_2_positions.old_division_name]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewDivVal" Left="359.1" Top="360" Width="359.1" Height="28.35" Text="[form_1_2.form_1_2_positions.new_division_name]" HorzAlign="Center" VertAlign="Bottom" Font="TH Sarabun New, 16pt"/>
|
||||
|
||||
<TextObject Name="P2OldWorkLabel" Top="388.35" Width="359.1" Height="28.35" Border.Lines="Left,Right" Text="ภาระงานที่รับผิดชอบ" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewWorkLabel" Left="359.1" Top="388.35" Width="359.1" Height="28.35" Border.Lines="Left,Right" Text="ภาระงานที่รับผิดชอบ" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldWorkVal" Top="416.7" Width="359.1" Height="132.3" Border.Lines="Left,Right,Bottom" Text="[form_1_2_positions.old_workload]" CanGrow="true" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewWorkVal" Left="359.1" Top="416.7" Width="359.1" Height="132.3" Border.Lines="Left,Right,Bottom" Text="[form_1_2_positions.new_workload]" CanGrow="true" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2OldWorkVal" Top="416.7" Width="359.1" Height="132.3" Border.Lines="Left,Right,Bottom" Text="[form_1_2.form_1_2_positions.old_workload]" CanGrow="true" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2NewWorkVal" Left="359.1" Top="416.7" Width="359.1" Height="132.3" Border.Lines="Left,Right,Bottom" Text="[form_1_2.form_1_2_positions.new_workload]" CanGrow="true" Font="TH Sarabun New, 16pt"/>
|
||||
|
||||
<TextObject Name="P2ReasonLabel" Top="558.9" Width="718.2" Height="28.35" Text="เหตุผลความจำเป็น" Font="TH Sarabun New, 16pt, style=Underline,Bold"/>
|
||||
<TextObject Name="P2ReasonVal" Top="587.25" Width="718.2" Height="94.5" Border.Lines="Bottom" Text="[form_1_2_positions.reason]" CanGrow="true" Font="TH Sarabun New, 16pt"/>
|
||||
<TextObject Name="P2ReasonVal" Top="587.25" Width="718.2" Height="94.5" Border.Lines="Bottom" Text="[form_1_2.form_1_2_positions.reason]" CanGrow="true" Font="TH Sarabun New, 16pt"/>
|
||||
|
||||
<TextObject Name="P2Certify" Top="700.65" Width="718.2" Height="28.35" Text="ขอรับรองว่าข้อความดังกล่าวข้างต้นเป็นความจริงทุกประการ" Font="TH Sarabun New, 16pt"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user