on 07-06-2015 8:19 PM
I have to integrate my Java Spring MVC project with Crystal Reports using POJO. In order to accomplish this, CR requires you to return a ResultSet class along with your bean.
It works when returning a statically assigned collection to ResultSet. Plain and simple. However, I'm running into problems when I try to add DB connectivity via database expert > java beans connectivity returns "failed to retrieve data from the database"
My project has 5 layers -
view
controller -- fetch data and stream PDF to session
service -- get
dao
domain
Steps-
Does anyone know if this support dependency injection? Or anyone have any luck getting this to work?
code example
@Service
public class PersonReportServiceImpl implements PersonReportService {
@Autowired
PersonService personService;
@Override
public ResultSet getPerson(Long personId) {
List<Person> personList = new ArrayList<Person>();
//calls existing service
personList = personService.getPerson(personId);
POJOResultSetFactory factory = new POJOResultSetFactory(
Person.class);
POJOResultSet resultSet = factory.createResultSet(personList);
return personList;
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.