[URGENTE] Relatórios em Grails - Passagem de Parâmetros
07/11/2010 00:00
<g:jasperReport jasper="arquivoJasper" format="TIPODOARQUIVO" name="NomeDoArquivoQueSeraGerado" >
Nome: <input type="text" name="nome"/>
Id: <input type="text" name="id"/>
</g:jasperReport>
def geraRelatorio = {
def parametros;
parametros.nome = "Lucas"
parametros.id = 2;
chain(controller:'jasper',action:'index',params:parametros)
}
<g:jasperReport jasper="RelatorioTurmaAluno02" format="PDF" name="RelatorioTurmaAluno02" />
Turma: <input type="text" name="PAR_TURMA"/><br>
Disciplina: <input type="text" name="PAR_DISCIPLINA"/><br>
Aluno: <input type="text" name="PAR_ALUNO"/><br>
Nota trabalhos: <input type="text" name="PAR_NOTATRAB"/><br>
Nota provas: <input type="text" name="PAR_NOTAPROVA"/><br>
Nota Final: <input type="text" name="PAR-NOTAFINAL"/><br>
Código:
<g:jasperReport jasper="RelatorioTurmaAluno02" format="PDF" name="RelatorioTurmaAluno02" />
Turma: <input type="text" name="PAR_TURMA"/><br>
Disciplina: <input type="text" name="PAR_DISCIPLINA"/><br>
Aluno: <input type="text" name="PAR_ALUNO"/><br>
Nota trabalhos: <input type="text" name="PAR_NOTATRAB"/><br>
Nota provas: <input type="text" name="PAR_NOTAPROVA"/><br>
Nota Final: <input type="text" name="PAR-NOTAFINAL"/><br>
<g:jasperReport jasper="RelatorioTurmaAluno02" format="PDF" name="RelatorioTurmaAluno02" />
<g:jasperReport jasper="RelatorioTurmaAluno02" format="PDF" name="RelatorioTurmaAluno02" >
Turma: <input type="text" name="PAR_TURMA"/><br>
Disciplina: <input type="text" name="PAR_DISCIPLINA"/><br>
Aluno: <input type="text" name="PAR_ALUNO"/><br>
Nota trabalhos: <input type="text" name="PAR_NOTATRAB"/><br>
Nota provas: <input type="text" name="PAR_NOTAPROVA"/><br>
Nota Final: <input type="text" name="PAR-NOTAFINAL"/><br>
</g:jasperReport>
Para se registrar, clique aqui.