boa tarde sou novo em programação e estou com um problema!
uso o netbeans 7.0, postgres e o ireport.
quando vou gerar os relatorios e os executo pelo netbeans ele executa mas aparece o seguinte erro
log4j:WARN No appenders could be found for logger (net.sf.jasperreports.extensions.ExtensionsEnvironment).
log4j:WARN Please initialize the log4j system properly.
quando mando construir para executar sem abrir o netbenas não chama mais o relatorio.
ajudaa!!!
[b]meu codigo…
String url = “jdbc:postgresql://localhost:5432/CALCMED”;
String usuario = “postgres”;
String senha = “123”;
Class.forName(“org.postgresql.Driver”);
Connection con;
con = DriverManager.getConnection(url, usuario, senha);
Statement stmt = con.createStatement();
ResultSet RS = stmt.executeQuery(“Select * from alunos ORDER BY nome”);
JRResultSetDataSource jrRS =new JRResultSetDataSource(RS);
JasperPrint jasperPrint = JasperFillManager.fillReport(“src/relatorio/pp.jasper”,new HashMap(), jrRS);
JasperViewer.viewReport(jasperPrint,false);[/b]