1
I need to create a report of the selected month with the information contained in the database, for this I intend to create a variable in iReport that receives the month (by netbens) which will be compared with the existing sql in Ireport that is directly connected to the bank.
Metrodo iReport:
public void imprimir() {
try {
JasperPrint print = JasperFillManager.fillReport("C:\\Users\\costa\\OneDrive\\Documentos\\NetBeansProjects\\Relatorio\\Estoque.jasper", null, conexao);
JasperViewer.viewReport(print, false);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
}
}
SQL present in iReport:
select * from Hospede h where DATE_FORMAT(h.horaini,'%m') = variavel
Is there an error? What is your question?
– R.Santos