galera me ajudem!!!
pessoal q manja de jasper ireport, tenho no meu bd mysql apenas uma tupla ou (linha)
observe a qtde = 50.
entao eu kero imprimir 50 etiquetas mais meu bd tem apenas (01) uma linha, ou seja (01) etiqueta ????????como fazer issu no meu metodo ?????????
codEtq descricao lote turma maquina data qtde
1 algodao 1 A 1 2006-08-02 50
public class GeraRelatorioEtiqueta {
BDConexao conexao = new BDConexao();
String path = "F:/MYSQL/";
String path2 = "C:/eclipse/workspace/";
/* Gera Relatorio e visualiza-o */
public void geraEtiquetas1()throws Exception {
Connection con = conexao.criaConeccao();
con.setAutoCommit(false);
PreparedStatement consulta = con.prepareStatement
(
" select codEtiqueta,descricao,lote,turma,maquina,data,qtde " +
" from etiquetas "
);
ResultSet rs = consulta.executeQuery();
}
JRResultSetDataSource jrRS = new JRResultSetDataSource(rs);
// /*HashMap de parametros utilizados no relatório. Sempre instanciados */
HashMap parameters = new HashMap();
JasperFillManager.fillReportToFile(path2+"TextilETQGUI/Relatorios/teste.jasper",parameters, jrRS);
JasperViewer.viewReport(path2+"TextilETQGUI/Relatorios/teste.jrprint", false, false);
public static void main(String[] args) throws Exception {
GeraRelatorioEtiqueta jan = new GeraRelatorioEtiqueta();
jan.geraEtiquetas1();
}
}