Telerik Reporting

Telerik Reporting

แสดงหน้ารายงาน

curl --location -g --request GET 'https://atlasx.cdg.co.th/axws-demo/api/reports/view?REPORT_CONFIG={"template_name":"<trdx/trdp file>"}&REPORT_PARAMS={}'

Example

แสดงตัวอย่าง

View Telerik Reporting

Export เป็นไฟล์ต่าง ๆ

curl --location -g --request GET 'https://atlasx.cdg.co.th/axws-demo/api/reports/export?REPORT_CONFIG={"template_name":"<trdx/trdp file>", "export_extension":"<pdf/xls/xlsx/doc/docx>"}&REPORT_PARAMS={}'

Example

แสดงตัวอย่าง

Export Telerik Reporting

Custom JSON Data Source

  1. เปิดโฟลเดอร์ Report แล้วคัดลอกไฟล์ AtlasX.TelerikReporting.dll
  2. เปิดโฟล์เดอร์ C:\Program Files (x86)\Progress\Telerik Reporting R1 2020\Report Designer แล้วนำไฟล์ที่คัดลอกวางในโฟล์เดอร์นี้ (พาทและเวอร์ชั่นของ Telerik Reporting แต่ละเครื่องอาจจะไม่เหมือนกัน)
  3. เปิดไฟล์ Telerik.ReportDesigner.exe.config แล้วปรับแก้คอนฟิกตามตัวอย่าง
<?xml version ="1.0"?>
<configuration>
  ...
  <!-- Add assembly references -->

  <Telerik.Reporting>
    <AssemblyReferences>
      <!-- <add name="MyFunctions" version="1.0.0.0" /> -->
      <add name="AtlasX.TelerikReporting" version="1.0.0.0" />
    </AssemblyReferences>
  </Telerik.Reporting>
  ...
</configuration>
  1. (Optional) แก้คอนฟิกของไฟล์ Telerik.ReportDesigner.x86.exe.config
  2. ดูตัวอย่าง Template รายงานได้ที่ไฟล์ Custom Data Source Test.trdx
  3. แสดงตัวอย่างรายงาน

Report Configure

KeyRequriedDescription
template_nametrueชื่อไฟล์และนามสกุลของเทมเพลตของรายงานที่อยู่ในโฟลเดอร์ Report/Templates เช่น My Report 1.trdx เป็นต้น หากมีการวางไฟล์ไว้ในโฟลเดอร์ เราสามารถระบุ Path นำหน้าชื่อไฟล์ได้เลย เช่น Work1/LandUse.trdx
report_viewer_titlefalseแสดง Title ของเว็บบราวเซอร์
export_extensionOnly required when exportนามสกุลของไฟล์ที่ต้องการ Export เช่น pdfxls เป็นต้น