Subreport with iReport in Java - The supplied java.sql.Connection Object is null

Asked

Viewed 29 times

1

Hello!

I’m studying iReport Design and started using Connection in my fillReport. So far, everything was fine. The problem is that, now, I started to use Collection, through the commands:

List<Vendas> vendas = new VendasDAO().getVendasPorPeriodo(
                new SimpleDateFormat("yyyyMMdd").parse("20180101"),
                new SimpleDateFormat("yyyyMMdd").parse("20180131")
        );

JRDataSource dataSource = new JRBeanCollectionDataSource(vendas);

That way, when I try to run, I get the following error:

WARNING: The supplied java.sql.Connection Object is null.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.