{"id":1191,"date":"2025-10-09T07:17:43","date_gmt":"2025-10-09T00:17:43","guid":{"rendered":"https:\/\/portal-atlasx.cdg.co.th\/home\/docs\/atlasx-web-service-v8-0\/features\/build-report-with-telerik-reporting\/"},"modified":"2026-03-27T09:01:33","modified_gmt":"2026-03-27T02:01:33","slug":"build-report-with-telerik-reporting","status":"publish","type":"docs","link":"https:\/\/portal-atlasx.cdg.co.th\/home\/docs\/axws\/features\/build-report-with-telerik-reporting\/","title":{"rendered":"Build report with Telerik Reporting"},"content":{"rendered":"\n\n\n<p>AtlasX Web Service \u0e23\u0e2d\u0e07\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e41\u0e25\u0e30 export \u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e43\u0e19\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e15\u0e48\u0e32\u0e07\u0e46 \u0e1c\u0e48\u0e32\u0e19 Telerik Reporting \u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49&nbsp;<code>ReportService<\/code>&nbsp;\u0e0b\u0e36\u0e48\u0e07\u0e23\u0e2d\u0e07\u0e23\u0e31\u0e1a\u0e17\u0e31\u0e49\u0e07\u0e01\u0e32\u0e23 export \u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e40\u0e14\u0e35\u0e48\u0e22\u0e27\u0e41\u0e25\u0e30\u0e01\u0e32\u0e23\u0e23\u0e27\u0e21\u0e2b\u0e25\u0e32\u0e22\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e40\u0e1b\u0e47\u0e19 report book<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32<\/strong><\/h2>\n\n\n\n<p>\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32 Telerik Reporting \u0e43\u0e19&nbsp;<code>appsettings.json<\/code><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>{\n  \"telerikReporting\": {\n    \"extensions\": [\n      {\n        \"name\": \"IMAGE\",\n        \"parameters\": &#91;\n          { \"Name\": \"OutputFormat\", \"Value\": \"JPEG\" },\n          { \"Name\": \"DpiX\", \"Value\": \"300\" },\n          { \"Name\": \"DpiY\", \"Value\": \"300\" },\n          { \"Name\": \"TextRenderingHint\", \"Value\": \"AntiAliasGridFit\" }\n        &#93;\n      }\n    ],\n    \"privateFonts\": &#91;\n      {\n        \"fontFamily\": \"TH Sarabun New\",\n        \"path\": \"Report\/Assets\/fonts\/THSarabunNew\/THSarabunNew.ttf\"\n      },\n      {\n        \"fontFamily\": \"TH Sarabun New\",\n        \"path\": \"Report\/Assets\/fonts\/THSarabunNew\/THSarabunNew Italic.ttf\",\n        \"fontStyle\": \"Italic\"\n      },\n      {\n        \"fontFamily\": \"TH Sarabun New\",\n        \"path\": \"Report\/Assets\/fonts\/THSarabunNew\/THSarabunNew Bold.ttf\",\n        \"fontStyle\": \"Bold\"\n      },\n      {\n        \"fontFamily\": \"TH Sarabun New\",\n        \"path\": \"Report\/Assets\/fonts\/THSarabunNew\/THSarabunNew BoldItalic.ttf\",\n        \"fontStyle\": \"Bold,Italic\"\n      }\n    &#93;\n  }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  <\/span><span style=\"color: #0451A5\">&quot;telerikReporting&quot;<\/span><span style=\"color: #000000\">: {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0451A5\">&quot;extensions&quot;<\/span><span style=\"color: #000000\">: [<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;name&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;IMAGE&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;parameters&quot;<\/span><span style=\"color: #000000\">: &#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">          { <\/span><span style=\"color: #0451A5\">&quot;Name&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;OutputFormat&quot;<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #0451A5\">&quot;Value&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;JPEG&quot;<\/span><span style=\"color: #000000\"> },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">          { <\/span><span style=\"color: #0451A5\">&quot;Name&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;DpiX&quot;<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #0451A5\">&quot;Value&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;300&quot;<\/span><span style=\"color: #000000\"> },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">          { <\/span><span style=\"color: #0451A5\">&quot;Name&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;DpiY&quot;<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #0451A5\">&quot;Value&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;300&quot;<\/span><span style=\"color: #000000\"> },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">          { <\/span><span style=\"color: #0451A5\">&quot;Name&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;TextRenderingHint&quot;<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #0451A5\">&quot;Value&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;AntiAliasGridFit&quot;<\/span><span style=\"color: #000000\"> }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        &#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    ],<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #0451A5\">&quot;privateFonts&quot;<\/span><span style=\"color: #000000\">: &#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;fontFamily&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;TH Sarabun New&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;path&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;Report\/Assets\/fonts\/THSarabunNew\/THSarabunNew.ttf&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;fontFamily&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;TH Sarabun New&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;path&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;Report\/Assets\/fonts\/THSarabunNew\/THSarabunNew Italic.ttf&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;fontStyle&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;Italic&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;fontFamily&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;TH Sarabun New&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;path&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;Report\/Assets\/fonts\/THSarabunNew\/THSarabunNew Bold.ttf&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;fontStyle&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;Bold&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;fontFamily&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;TH Sarabun New&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;path&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;Report\/Assets\/fonts\/THSarabunNew\/THSarabunNew BoldItalic.ttf&quot;<\/span><span style=\"color: #000000\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        <\/span><span style=\"color: #0451A5\">&quot;fontStyle&quot;<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #A31515\">&quot;Bold,Italic&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    &#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>Section<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td><code>extensions<\/code><\/td><td>\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32\u0e01\u0e32\u0e23 export \u0e43\u0e19\u0e41\u0e15\u0e48\u0e25\u0e30\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a \u0e40\u0e0a\u0e48\u0e19 IMAGE \u0e01\u0e33\u0e2b\u0e19\u0e14 output format, DPI \u0e41\u0e25\u0e30 text rendering<\/td><\/tr><tr><td><code>privateFonts<\/code><\/td><td>\u0e25\u0e07\u0e17\u0e30\u0e40\u0e1a\u0e35\u0e22\u0e19 font \u0e17\u0e35\u0e48\u0e43\u0e0a\u0e49\u0e43\u0e19\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19 \u0e23\u0e30\u0e1a\u0e38 fontFamily, path \u0e41\u0e25\u0e30 fontStyle (Regular, Italic, Bold, Bold Italic)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Service Registration<\/h2>\n\n\n\n<p>\u0e25\u0e07\u0e17\u0e30\u0e40\u0e1a\u0e35\u0e22\u0e19 TelerikReport \u0e40\u0e02\u0e49\u0e32 DI container \u0e43\u0e19 <code>Program.cs<\/code><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>builder.Services.AddTelerikReporting(builder.Configuration);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #9CDCFE\">builder<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #9CDCFE\">Services<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">AddTelerikReporting<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">builder<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #9CDCFE\">Configuration<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Inject ReportService<\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>public class MyService\n{\n    private readonly ReportService _reportService;\n\n    public MyService(ReportService reportService)\n    {\n        _reportService = reportService;\n    }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #9CDCFE\">public<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">class<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #4EC9B0\">MyService<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #569CD6\">private<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #569CD6\">readonly<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">ReportService<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">_reportService<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #569CD6\">public<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">MyService<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">ReportService<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">reportService<\/span><span style=\"color: #D4D4D4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #9CDCFE\">_reportService<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #9CDCFE\">reportService<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Method<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>Method<\/strong><\/td><td><strong>Return<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td><code>ExportAsync()<\/code><\/td><td><code>RenderingResult<\/code><\/td><td>Export \u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e40\u0e14\u0e35\u0e48\u0e22\u0e27\u0e08\u0e32\u0e01 template \u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38<\/td><\/tr><tr><td><code>ExportSourceBookAsync()<\/code><\/td><td><code>RenderingResult<\/code><\/td><td>\u0e23\u0e27\u0e21\u0e2b\u0e25\u0e32\u0e22\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e40\u0e1b\u0e47\u0e19\u0e44\u0e1f\u0e25\u0e4c\u0e40\u0e14\u0e35\u0e22\u0e27\u0e41\u0e25\u0e49\u0e27 export<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>RenderingResult<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td>Property<\/td><td>Type<\/td><td>Description<\/td><\/tr><tr><td><code>DocumentBytes<\/code><\/td><td><code>byte[]<\/code><\/td><td>\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32\u0e02\u0e2d\u0e07\u0e44\u0e1f\u0e25\u0e4c\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19<\/td><\/tr><tr><td><code>MimeType<\/code><\/td><td><code>string<\/code><\/td><td>MIME type \u0e40\u0e0a\u0e48\u0e19 <code>application\/pdf<\/code><\/td><\/tr><tr><td><code>Extension<\/code><\/td><td><code>string<\/code><\/td><td>\u0e19\u0e32\u0e21\u0e2a\u0e01\u0e38\u0e25\u0e44\u0e1f\u0e25\u0e4c \u0e40\u0e0a\u0e48\u0e19 <code>pdf<\/code>, <code>xlsx<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Export&nbsp;Report<\/strong><\/h3>\n\n\n\n<p>\u0e43\u0e0a\u0e49&nbsp;<code>ExportAsync()<\/code> \u0e43\u0e19\u0e01\u0e32\u0e23 Export \u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e08\u0e32\u0e01 template \u0e17\u0e35\u0e48\u0e01\u0e33\u0e2b\u0e19\u0e14 \u0e42\u0e14\u0e22\u0e2a\u0e48\u0e07 <code>REPORT_CONFIG<\/code> \u0e40\u0e1b\u0e47\u0e19 JSON \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e23\u0e30\u0e1a\u0e38 template \u0e41\u0e25\u0e30\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e44\u0e1f\u0e25\u0e4c\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>var reportConfig = new\n{\n    template_name = \"monthly-report.trdp\",\n    export_extension = \"PDF\"\n};\n\nvar queryParameter = new QueryParameter();\nqueryParameter&#91;\"REPORT_CONFIG\"&#93; = JsonSerializer.Serialize(reportConfig);\nqueryParameter&#91;\"REPORT_PARAMS\"&#93; = JsonSerializer.Serialize(new Dictionary&lt;string, object>\n{\n    { \"MONTH\", \"01\" },\n    { \"YEAR\", \"2025\" }\n});\n\nvar result = _reportService.ExportAsync(queryParameter);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">var<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">reportConfig<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #569CD6\">new<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #9CDCFE\">template_name<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #CE9178\">&quot;monthly-report.trdp&quot;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #9CDCFE\">export_extension<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #CE9178\">&quot;PDF&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">};<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #569CD6\">var<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">queryParameter<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #569CD6\">new<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">QueryParameter<\/span><span style=\"color: #D4D4D4\">();<\/span><\/span>\n<span class=\"line\"><span style=\"color: #9CDCFE\">queryParameter<\/span><span style=\"color: #D4D4D4\">&#91;<\/span><span style=\"color: #CE9178\">&quot;REPORT_CONFIG&quot;<\/span><span style=\"color: #D4D4D4\">&#93; = <\/span><span style=\"color: #9CDCFE\">JsonSerializer<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">Serialize<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">reportConfig<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #9CDCFE\">queryParameter<\/span><span style=\"color: #D4D4D4\">&#91;<\/span><span style=\"color: #CE9178\">&quot;REPORT_PARAMS&quot;<\/span><span style=\"color: #D4D4D4\">&#93; = <\/span><span style=\"color: #9CDCFE\">JsonSerializer<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">Serialize<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #569CD6\">new<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">Dictionary<\/span><span style=\"color: #D4D4D4\">&lt;<\/span><span style=\"color: #9CDCFE\">string<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #9CDCFE\">object<\/span><span style=\"color: #D4D4D4\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    { <\/span><span style=\"color: #CE9178\">&quot;MONTH&quot;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">&quot;01&quot;<\/span><span style=\"color: #D4D4D4\"> },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    { <\/span><span style=\"color: #CE9178\">&quot;YEAR&quot;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">&quot;2025&quot;<\/span><span style=\"color: #D4D4D4\"> }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">});<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #569CD6\">var<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">result<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #9CDCFE\">_reportService<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">ExportAsync<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">queryParameter<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-group is-layout-flow wp-block-group-is-layout-flow\">\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>Parameter<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td><code>REPORT_CONFIG<\/code><\/td><td>JSON \u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38&nbsp;<code>template_name<\/code>&nbsp;(\u0e0a\u0e37\u0e48\u0e2d\u0e44\u0e1f\u0e25\u0e4c template) \u0e41\u0e25\u0e30&nbsp;<code>export_extension<\/code>&nbsp;(\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a export \u0e40\u0e0a\u0e48\u0e19 PDF, XLSX, IMAGE)<\/td><\/tr><tr><td><code>REPORT_PARAMS<\/code><\/td><td>JSON \u0e17\u0e35\u0e48\u0e23\u0e30\u0e1a\u0e38 parameters \u0e17\u0e35\u0e48\u0e08\u0e30\u0e2a\u0e48\u0e07\u0e40\u0e02\u0e49\u0e32 template \u0e23\u0e32\u0e22\u0e07\u0e32\u0e19 (optional)<\/td><\/tr><\/tbody><\/table><\/figure>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Export Report Book<\/strong><\/h3>\n\n\n\n<p>\u0e43\u0e0a\u0e49&nbsp;<code>ExportSourceBookAsync()<\/code>&nbsp;\u0e43\u0e19\u0e01\u0e32\u0e23 Export \u0e2b\u0e25\u0e32\u0e22\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19\u0e23\u0e27\u0e21\u0e40\u0e1b\u0e47\u0e19\u0e44\u0e1f\u0e25\u0e4c\u0e40\u0e14\u0e35\u0e22\u0e27 \u0e42\u0e14\u0e22\u0e2a\u0e48\u0e07 <code>ReportBookConfig<\/code> \u0e17\u0e35\u0e48\u0e21\u0e35\u0e23\u0e32\u0e22\u0e01\u0e32\u0e23 template \u0e41\u0e25\u0e30 parameters \u0e02\u0e2d\u0e07\u0e41\u0e15\u0e48\u0e25\u0e30\u0e23\u0e32\u0e22\u0e07\u0e32\u0e19<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>var reportBookConfig = new ReportBookConfig\n{\n    ExportExtension = \"PDF\",\n    ReportSources =\n    &#91;\n        new ReportSourceConfig\n        {\n            TemplateName = \"report-part1.trdp\",\n            Params = new Dictionary&lt;string, object>\n            {\n                { \"MONTH\", \"01\" }\n            }\n        },\n        new ReportSourceConfig\n        {\n            TemplateName = \"report-part2.trdp\",\n            Params = new Dictionary&lt;string, object>\n            {\n                { \"YEAR\", \"2025\" }\n            }\n        }\n    &#93;\n};\n\nvar result = _reportService.ExportSourceBookAsync(reportBookConfig);<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">var<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">reportBookConfig<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #569CD6\">new<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">ReportBookConfig<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #9CDCFE\">ExportExtension<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #CE9178\">&quot;PDF&quot;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #9CDCFE\">ReportSources<\/span><span style=\"color: #D4D4D4\"> =<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &#91;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #569CD6\">new<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">ReportSourceConfig<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #9CDCFE\">TemplateName<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #CE9178\">&quot;report-part1.trdp&quot;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #9CDCFE\">Params<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #569CD6\">new<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">Dictionary<\/span><span style=\"color: #D4D4D4\">&lt;<\/span><span style=\"color: #9CDCFE\">string<\/span><span style=\"color: #D4D4D4\">, object&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                { <\/span><span style=\"color: #CE9178\">&quot;MONTH&quot;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">&quot;01&quot;<\/span><span style=\"color: #D4D4D4\"> }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        },<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        <\/span><span style=\"color: #569CD6\">new<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">ReportSourceConfig<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #9CDCFE\">TemplateName<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #CE9178\">&quot;report-part2.trdp&quot;<\/span><span style=\"color: #D4D4D4\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            <\/span><span style=\"color: #9CDCFE\">Params<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #569CD6\">new<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">Dictionary<\/span><span style=\"color: #D4D4D4\">&lt;<\/span><span style=\"color: #9CDCFE\">string<\/span><span style=\"color: #D4D4D4\">, object&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">                { <\/span><span style=\"color: #CE9178\">&quot;YEAR&quot;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">&quot;2025&quot;<\/span><span style=\"color: #D4D4D4\"> }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">            }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">        }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &#93;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">};<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #569CD6\">var<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">result<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #9CDCFE\">_reportService<\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #DCDCAA\">ExportSourceBookAsync<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">reportBookConfig<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span><\/code><\/pre><\/div>\n","protected":false},"featured_media":0,"parent":1186,"menu_order":4,"comment_status":"open","ping_status":"closed","template":"","meta":{"nav_title":"","positive":"","negative":"","footnotes":""},"docs_category":[],"class_list":["post-1191","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/1191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/comments?post=1191"}],"version-history":[{"count":8,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/1191\/revisions"}],"predecessor-version":[{"id":4231,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/1191\/revisions\/4231"}],"up":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/1186"}],"wp:attachment":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/media?parent=1191"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs_category?post=1191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}