Jump to content
We've recently updated our Privacy Statement, available here ×

Table missing first record using IWSDataSource


sarino
Go to solution Solved by sarino,

Recommended Posts

I have a JSON datasource I want to feed to a table. Following the steps in http://community.jaspersoft.com/wiki/why-first-record-missing-my-subreport I have created a parameter to store the datasource and set the table with said parameter. To set the parameter, I have written a small scriptlet.

public class Scriptlet extends JRDefaultScriptlet {    private JRDataSource dataSourceOriginal;    @Override        public void beforeReportInit() {        dataSourceOriginal = (JRDataSource) this.parametersMap.get("REPORT_DATA_SOURCE").getValue();        setData(this.parametersMap, this.fieldsMap, this.variablesMap, this.groups);    }        @Override    public void setData(Map parameters, Map fields, Map variables, JRFillGroup[] groups) {        parameters.put("DATASOURCE", dataSourceOriginal);        super.setData(parameters, fields, variables, groups);    }}[/code]

While I can use the Data Source stored in $P{DATASOURCE} but it is missing the first record as well.

What am I doing wrong?

 
Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...