Boa noite a todos,
Eu to fazendo um relatorio com sub relatorio no Ireport, o problema é que não como pegar a lista que to passando como parametro… Para exemplificar vou postar da forma que ta…
minha action
public String execute() throws Exception {
try
{
GenericDaoHibernateImpl<RelatorioStausTarefaProjetoModel, Integer> daoRelStatProj = new GenericDaoHibernateImpl<RelatorioStausTarefaProjetoModel, Integer>(RelatorioStausTarefaProjetoModel.class);
GenericDaoHibernateImpl<RelatorioContendoConsultor, String> daoRelatorioContendoConsultor = new GenericDaoHibernateImpl<RelatorioContendoConsultor, String>(RelatorioContendoConsultor.class);
relStatusProjetoModel = daoRelStatProj.statusTarefaProjeto();
JRBeanCollectionDataSource source = new JRBeanCollectionDataSource(daoRelatorioContendoConsultor.relatorioContendoConsultor());
table.put("dataSource", source);
}
catch (Exception e)
{
e.printStackTrace();
}
return ActionSupport.SUCCESS;
}
struts.xml
<action name="relatorioStatusProjeto" class="action.ActionRelatorioStatusTarefasProjeto" method="execute">
<result name="success" type="jasper">
<param name="location">WEB-INF\classes\report1.jasper</param>
<param name="dataSource">relStatusProjetoModel</param>
<param name="format">PDF</param>
<param name="documentName">Relatorio Gerencial</param>
<param name="parameter">table</param>
</result>