BIRT POJO empty report

Nayelli
edited October 26, 2022 in Analytics #1

Hello

I am new to BIRT, I am trying to run my report using POJO datasource.

I created my PersonBirt class with my 3 methods:

public class PersonBirt {

@Autowired

private PersonProvider personProvider;

Iterator<PeopleLinkData> iterator;


public void open(Object appContext, Map<String, Object> params, PeopleLinkFilter filter) {

// access provider

List<PeopleLinkData> peopleLinksData = personProvider.getPeopleLinks(filter);

iterator = peopleLinksData.iterator();

}


public Object next() {

if (iterator == null || iterator.next() == null) {

return iterator;

}

if (iterator.hasNext()) {

return iterator.next();

}

return iterator;

}

public void close() {

iterator = null;

}


}

  • created my JAR and added it to my dataSource
  • Returns empty the report, I guess because it needs a personId as my provider
  • SELECT

*

FROM

ILPEOPLELINKS peoplelinks

WHERE 1=1

<if test="personId != null">

AND peoplelinks.PeopleSerno = #{personId}

  • Added the parameter Peopleserno in dataset but it keeps showing empty