primeiramente agradeço de coração sua ajuda....
uso postgreeSql e deu certo a conexão e tudo mas o problema é no caminho do relatorio em comentario tem algumas duvidas no codigo
public void ChamandoTurma() {
Connection connection = null;
try {
String reporta = "Relatorios";// não consigo entender essa linha onde uso isso aqui?
Map<String, Object> parameters = new HashMap<String, Object>();
Class.forName("org.postgresql.Driver");
// Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
// connection =DriverManager.getConnection("jdbc:sqlserver://localhost;databaseName=Teste","teste","123123");
connection = DriverManager.getConnection("jdbc:postgresql://localhost:5432/sisgae", "postgres", "senha");
// compiles jrxml
JasperCompileManager.compileReportToFile(reporta + "Relat/RelatorioTurmas.jrxml");//erro aqui ele não consegue achar o relatorio
//mas to passando certinho como:
//pacote/relatorio
// fills compiled report with parameters and a connection
JasperPrint print = JasperFillManager.fillReport(reporta + "Relat/RelatorioTurmas.jasper", parameters, connection);
// exports report to pdf
JRExporter exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, new FileOutputStream(reporta + "relatoriozinho.pdf")); // your output goes here
exporter.exportReport();
} catch (Exception e) {
e.printStackTrace();
} finally {
// it's your responsibility to close the connection, don't forget it!
if (connection != null) {
try {
connection.close();
} catch (Exception e) {
}
}
}
}