Pessoal, será que alguém poderia me ajudar com o erro abaixo?
Erro!!
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘tbl_cliente’ at line 1
mysql!!
public boolean relatorioClientesDAO() {
try {
this.conectar();
this.executarSQL(
"SELECT "
+ " tbl_cliente.pk_id_cliente AS tbl_cliente_pk_id_cliente,"
+ " tbl_cliente.cli_nome AS tbl_cliente_cli_nome,"
+ " tbl_cliente.cli_endereco AS tbl_cliente_cli_endereco,"
+ " tbl_cliente.cli_bairro AS tbl_cliente_cli_bairro,"
+ " tbl_cliente.cli_cidade AS tbl_cliente_cli_cidade,"
+ " tbl_cliente.cli_uf AS tbl_cliente_cli_uf,"
+ " tbl_cliente.cli_cep AS tbl_cliente_cli_cep,"
+ " tbl_cliente.cli_telefone AS tbl_cliente_cli_telefone,"
+ " tbl_cliente.cli_veiculo AS tbl_cliente_cli_veiculo"
+ "FROM "
+ " tbl_cliente"
);
JRResultSetDataSource jrRs = new JRResultSetDataSource(getResultSet());
InputStream caminhoRelatorio = this.getClass().getClassLoader().getResourceAsStream("ireport/cliente.jasper");
JasperPrint jasperPrint = JasperFillManager.fillReport(caminhoRelatorio, new HashMap(), jrRs);
JasperExportManager.exportReportToPdfFile(jasperPrint, "relatorios/cliente.pdf");
File file = new File("relatorios/cliente.pdf");
try {
Desktop.getDesktop().open(file);
} catch (Exception e) {
JOptionPane.showConfirmDialog(null, e);
}
file.deleteOnExit();
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
} finally {
this.fecharConexao();
}
}
Tenho outros 3 relatorios que funcionam perfeitamente e o codigo é o mesmo, apenas este não quer funcionar.