Call to undefined method rowExport()

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
jjarambur
User
Posts: 1

Call to undefined method rowExport()

Post by jjarambur »

Error
...models\Experiencias.php(1309): Call to undefined method PHPMaker2024\proyectocertificados\ExperienciasList::rowExport()

Script

function Row_Export($doc, $rs)
{
    if ($this->isExport("pdf")) {
        // Obtener los valores de los campos
        $trabajador = $rs['trabajadores'];
        $cargoNombre = $rs['cargoNombre'];
        $fechaInicio = $rs['fechaInicio'];
        $fechaFin = $rs['fechaFin'];
        $funciones = $rs['funciones'];

        // Construir el contenido personalizado
        $content = "La empresa xxxx certifica a {$trabajador}, el cual trabajó desde el {$fechaInicio} hasta el {$fechaFin} en el cargo {$cargoNombre} con las siguientes funciones:";
        $content .= "<ul>";
        $content .= "<li>{$funciones}</li>";
        $content .= "<li>{$funciones}</li>"; // Añade más funciones si es necesario
        $content .= "</ul>";

        // Agregar el contenido al documento PDF
        $doc->Text .= $content;
    }
}

arbei
User
Posts: 9504

Post by arbei »

Where did you put above script? Make sure you put it under "Row_Export" server event and not elsewhere.

Make sure you also use Page_Exporting and return true to use "Row_Export" server event. Read the docs for details.

After adding server event make sure you generate all scripts for that table again.


Post Reply