diff --git a/wwwroot/reports/change_position_offer_request_form.frx b/wwwroot/reports/change_position_offer_request_form.frx index bfdfb38..6899364 100644 --- a/wwwroot/reports/change_position_offer_request_form.frx +++ b/wwwroot/reports/change_position_offer_request_form.frx @@ -1,5 +1,39 @@ + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + // ตัดข้อความยาวเกินที่จุดเว้นวรรคสุดท้ายก่อน maxLen แทนการตัดกลางคำตรง ๆ + // (ถ้าไม่มีช่องว่างเลยในช่วงนั้น เช่น ข้อความไทยติดกันยาว ๆ จะตัดตรง maxLen เหมือนเดิม) + public static string TruncateAtWord(string text, int maxLen) + { + if (string.IsNullOrEmpty(text) || text.Length <= maxLen) return text; + string cut = text.Substring(0, maxLen); + int lastSpace = cut.LastIndexOf(' '); + if (lastSpace > 0) + { + cut = cut.Substring(0, lastSpace); + } + return cut + "..."; + } + } +} + @@ -80,7 +114,7 @@ - + @@ -139,11 +173,11 @@ - - + + - +