bom dia pessoal, to usando o jasper pra imprimir o conteudo de 1 jTable, to usando esse codigo
try
{
String fileName="c:\new_report.jasper";
Map parameters = new HashMap();
parameters.put("Report_title","teste");
JRTableModelDataSource Tabledata = new JRTableModelDataSource(report_table.getModel());
JasperPrint jasperPrint=JasperFillManager.fillReport(fileName,parameters,Tabledata);
JasperViewer jviewer = new JasperViewer(jasperPrint,false);
jviewer.show();
}
catch (Exception j)
{
JOptionPane.showMessageDialog(null,"Mensaje de Error:"+j.getMessage(),
"Excepción",JOptionPane.ERROR_MESSAGE);
}
minha duvida e como receber os dados no arquivo new_report.jasper, alguem sabe me dizer?