Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Gilberto Jr

Impressão Relatorio

Recommended Posts

Bom dia;

 

Eu tenho uma pagina no meu sistema que gera relatório. Só que esse relatório pode ter mais de 1 pagina.

 

Quando ele tiver mais de uma pagina eu gostaria que o cabeçalho e o roda pé saísse também nas outras paginas.

 

Hoje o cabeçalho sai somente na primeira pagina e o roda pé na ultima.

 

Alguém podeira me ajudar?

 

Att;

Compartilhar este post


Link para o post
Compartilhar em outros sites

Se este relatório esta sendo gerado em uma tabela, basta estruturar esta corretamente com o respectivo cabeçalho, corpo e rodapé que na impressão vai rodar como desejado. Se não for tabela, desconheço como fazer.

 

Att.

Compartilhar este post


Link para o post
Compartilhar em outros sites
<table>

  <caption>Title Table</caption>

  <!-- Cabeçalho -->
  <thead>
    <tr>
      <th>Title Col 1</th>
      <th>Title Col 2</th>
    </tr>
  </thead>
  
  <!-- Rodapé -->
  <tfoot>
    <tr>
      <td colspan="2">Footer Colspan (Col 1 and Col 2)</td>
    </tr>
  </tfoot>
  
  <!-- Corpo -->
  <tbody>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
  </tbody>

</table>

Att.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Então

Public2004

 

Eu fiz aqui, fiz da forma que vc colocou no código acima e nao deu certo.

 

Segue o código

<table style="margin:auto;">
 
  <caption>Title Table</caption>
 
  <!-- Cabeçalho -->
  <thead>
    <tr>
      <th>Title Col 1</th>
      <th>Title Col 2</th>
    </tr>
  </thead>
  
  <!-- Rodapé -->
  <tfoot>
    <tr>
      <td colspan="2">Footer Colspan (Col 1 and Col 2)</td>
    </tr>
  </tfoot>
  
  <!-- Corpo -->
  <tbody>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
    <tr>
      <td>Row 1 - Col 1</td>
      <td>Row 1 - Col 2</td>
    </tr>
    <tr>
      <td>Row 2 - Col 1</td>
      <td>Row 2 - Col 2</td>
    </tr>
  </tbody>
 
</table>

 

Att;

Compartilhar este post


Link para o post
Compartilhar em outros sites

Esta é a estrutura correta de uma tabela.

Com relação a maneira de impressão, infelizmente é questão de navegadores.

O exemplo funciona perfeitamente no FireFox. Chrome e outros podem ter diferenças...

 

Outra sugestão seria a extensão vReport : http://www.maujor.com/blog/2009/09/06/extensao-vreport/

 

De qualquer forma, espero que tenha ajudado.

 

Att.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Realmente relatório impresso no FireFox funciona perfeitamente. No Chrome não funciona.

 

Eu vou da uma pesquisada nesse vReport.

 

Att;

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.