I'm developing an application in php with mysql and at a certain point I need to make an appointment in the database and bring the information into a table. Until then, I need to have the option of printing all the contents of the table, that is, print (on paper) a dynamic query.
I studied ireport but I am very difficult, and I would like to know if there is another way to generate this impression or not. In another part of the application I print certificates and it is very quiet, but ireport gives me the impression that I will have to do some gambiarras to use with php.
Here is an example of the table I'm using, and remembering that sometimes the search generates several pages.
<table cellspacing="0" cellpadding="0" border="0" class="display" id="listausers">
<thead>
<tr>
<th>N°Registro</th><th>Beneficiário</th><th>Data Emissão</th><th>CPF</th><th>CNH</th><th>Data do Cadastro</th></th><th>Operações</th>
</tr>
</thead>
<tbody>
<?php
$data_atual=explode("/" , date('d/m/Y'));
$ano_atual=$data_atual[2];
$alvara_vaga_idoso = new alvara_vaga_idoso();
$alvara_vaga_idoso->selecionaTudo($alvara_vaga_idoso);
while($res = $alvara_vaga_idoso->retornaDados()):
echo '<tr>';
printf('<td>%s</td>',$res->num_registro ."/".$ano_atual);
printf('<td>%s</td>',$res->nome_beneficiario);
printf('<td>%s</td>',$res->data_emissao);
printf('<td>%s</td>',$res->cpf);
printf('<td>%s</td>',$res->cnh);
printf('<td class="center">%s</td>',date("d/m/Y - H:i:s",strtotime($res->datacad)));
printf('<td class="center"><a href="?m=alvara_vaga_idoso&t=incluir_alvaras_vaga_idoso" title="Novo Cadastro"> <img src="images/add.png" alt="Novo Cadastro"/> </a> <a href="?m=alvara_vaga_idoso&t=editar_alvara_vaga_idoso&num_registro=%s" title="Editar Cadastro"> <img src="images/edit.png" alt="Editar Cadastro"/> </a></a> <a href="?m=alvara_vaga_idoso&t=visualizar_alvara_vaga_idoso&num_registro=%s" title="Visualizar Cadastro"> <img src="images/view.png" alt="Visualizar Cadastro"/><a href="?m=alvara_vaga_idoso&t=imprimir_alvara_vaga_idoso&num_registro=%s" title="Imprimir Credencial"> <img src="images/printer.png" alt="Imprimir Credencial"/> </a> </td>',$res->num_registro,$res->num_registro,$res->num_registro);
echo '</tr>';
endwhile;
?>
</tbody>
</table>