I made my first custom template, it works fine. But when I am going to export the report to pdf, I get an error.
Route 'api/export/pdf/reportname' not found.
pdf export in standard summary report are ok.
Any idea? (v2024.10)
I made my first custom template, it works fine. But when I am going to export the report to pdf, I get an error.
Route 'api/export/pdf/reportname' not found.
pdf export in standard summary report are ok.
Any idea? (v2024.10)
"/export[/{param}[/{table}[/{key:.*}]]]"
always exists, are you sure your URL is correct? The correct actual URL should be http(s)://your-host/your-base-path/api/export/pdf/xxx
.CustomTemplateHeader:
<table class="ew-table no-border">
<tr>
<td><strong>Datum</strong></td>
<td></td>
<td><strong>Temp</strong></td>
</tr>
<br>
CustomTemplateBody:
<tr>
<td>{{: {{{dbvalue Datum}}} }}</td>
<td></td>
<td>{{: {{{dbvalue temp}}} }}</td>
</tr>
<br>
a simple example. But I'll start with the templates. However, a PDF export is necessary.
The route is ok, because the report is running. But in the api directory there is only a index.php and a web.config file, nothing else.
I just see that all the reports that I now create under 2024 can no longer be exported, neither PDF nor Excel.
airdriver wrote:
in the api directory there is only a index.php and a web.config file, nothing else.
You have web.config, are you using IIS? If not, what web server are you using? If Apache, you should have .htaccess.
It is correct that nothing else is there (except that you have enabled the FileManager extension). The index.php does everything for the API.
It seems that there is something wrong in the URL Rewrite of the API folder. Does your website have a base path, e.g. http(s)://your-host/your-base-path/api/export/pdf/xxx
? If you use IIS, you may post the content of the api folder's web.config for discussion?
arbei wrote:
If Apache, you should have .htaccess.
You might have not uploaded all the generated files.
Read URL Rewrite for details.