PdfReport
Render báo cáo PDF inline (preview trong tab/popup) — không cần download.
Source:
Core/Components/PdfReport.cs· ComType:PdfReport
Cấu hình
ComType: PdfReport
Template: report-template.pdf
DataSourceFilter: ?$filter=Year eq 2026
PreQuery: ...
Field DB dùng
| Field | Vai trò |
|---|---|
Template | Tên file PDF template chứa placeholder data. |
Label | Tiêu đề report. |
FieldName | Property bind nếu cần truyền field cụ thể vào template. |
Query | Query OData/SQL load data report. |
PreQuery | Query chạy trước (lookup / dependency). |
DataSourceFilter | OData filter đủ ?$filter=... giới hạn dataset. |
FormatEntity | Format entity render vào template. |
GroupFormat | Format header group nếu template có lặp. |
GetPropValue | Function lấy giá trị (rare — cho calculated field). |
Precision | Số chữ số thập phân. |
ScriptValidation | JS script validate data trước khi render. |
Style | Inline CSS cho viewer container. |
IdField | Tên field ID (default "Id"). |
Events | JSON map {"DOMContentLoaded": "..."}. |
Migration | Script migration nội bộ. |
System | True → admin-only. |
UpperCase | True → uppercase text trong report. |
ComponentType | Sub-type (rare). |
Events kích hoạt
| Event | Method signature |
|---|---|
DOMContentLoaded | (entity, this) |
this là chính component PdfReport — dùng để mutate runtime nếu cần.
Tip
Templatechỉ tên PDF template, backend render full report rồi trả PDF blob.ScriptValidationcho phép validate dữ liệu trước khi render.