I am trying to customize the export of pdf but the export is stuck at the loading and there are some console js errors.
Uncaught TypeError: Failed to execute ‘createObjectURL’ on ‘URL’: Overload resolution failed.this is my code for master table view:
function Page_Exporting()
{
if ($this->Export == "pdf") {
$this->ExportDoc->Text = "<p>My Title</p>"; // Add a title
return false; // Return false to skip default export and use Row_Export event
}
return true; // Return true to use default export and skip Row_Export event
}
function Row_Export($rs)
{
if ($this->Export == "pdf") {
$this->ExportDoc->Text .= "<div>" . $this->JID->ViewValue . "</div>";
}
}
on the detail table /list:
function Page_Exporting()
{
if ($this->Export == "pdf") {
$this->ExportDoc->Text = "<p>My Title</p>"; // Add a title
return false; // Return false to skip default export and use Row_Export event
}
return true; // Return true to use default export and skip Row_Export event
}
function Row_Export($rs)
{
if ($this->Export == "pdf") {
$this->ExportDoc->Text .= "<div>" . $this->SID->ViewValue . "</div>";
}
}
can you guys know what am doing wrong? i suspect the problem is for the detail table and not sure how to do that part
Thanks for the explanation , i do get this error for the detail table :Quotationslines.php(2240): Call to undefined method \Quotationslines::rowExport()
the code:
// Call Row Export server event
if ($doc->ExportCustom) {
$this->rowExport($row);
}
$recordset->moveNext();
}if i do export the detail table alone , there is no error , but if i do export from master/detail this happens.
The code for the Row_Export server event must be placed under Code → Server Events → Table-Specific → List/View Page → Row_Export. Do not put it elsewhere or PHPMaker does not know such event exists and cannot convert the method name from “Row_Export” to “rowExport”.
That is what i did , according to the documentation , first i return false in page_exporting and then put my code under row_export
function Page_Exporting()
{
if ($this->Export == "pdf") {
$this->ExportDoc->Text = "<p>My Title</p>"; // Add a title
return false; // Return false to skip default export and use Row_Export event
}
return true; // Return true to use default export and skip Row_Export event
}
function Row_Export($rs)
{
if ($this->Export == "pdf") {
$this->ExportDoc->Text .= "<div>" . $this->SID->ViewValue . "</div>";
}
}