public void generateItems(QueryParameter[] parameters) {
Connection connection = null;
PreparedStatement statement = null;
ResultSet rs = null;
Query query = reportDefinition.getQuery();
try {
connection = reportDefinition.getDatabase().getConnection();
statement = connection.prepareStatement(query.getSql(parameters), ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
if (parameters != null) {
int index = 0;
for (int i = 0; i < parameters.length; i++) {
if (parameters[i].isNeedToSet()) {
index++;