Hi,

I have been having problems with iterations within sub reports within jasper 
reports.

I have found the solution to this problem is for ValueStackDataSource to 
implement JRRewindableDataSource instead of JRDataSource and implement the 
method below.

Could this fix be added instead of me having to add this fix for every new 
build.

Many thanks.

David.

implement moveFirst with something like 

        public void moveFirst() throws JRException {
                Object dataSourceValue = valueStack.findValue(dataSource);
                if (dataSourceValue != null) {
            if (MakeIterator.isIterable(dataSourceValue)) {
                iterator = MakeIterator.convert(dataSourceValue);
            } else {
                Object[] array = new Object[1];
                array[0] = dataSourceValue;
                iterator = MakeIterator.convert(array);
            }
                } else {
                        LOG.warn("Data source value for data source " + 
dataSource + " was null");
                }
        }


      

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to