How do I create a method for starting a DB report? Follow my method below.
public void printReport (Date initialDate, Date endDate){
list<Sale> sales = getSales (initialDate, endDate);
for (Sale s:sales){
Store st = s.getStore(); // Recura a Loja
CreditCard cc = s.getCreditCard(); // Recupera o Cartão
System.out.println(st.getNome() + ";" + cc.getName() + s.getValue());
}
}