Hi all,

I am trying to make the default value of a parameter month (integer) be the value of the previous month.
To do this, I have created a datasource called PrevMonth which is a groovy script :

import org.pentaho.reporting.engine.classic.core.util.TypedTableModel
columnNames = new String[2]
columnNames[0] = "month"
columnNames[1] = "year"
Class[] columnTypes = new Class[2]
columnTypes[0] = Integer.class
columnTypes[1] = Integer.class
model = new TypedTableModel(columnNames, columnTypes)
Calendar cal =  GregorianCalendar.instance;
cal.add(Calendar.MONTH, -1);
return model 
This script returns two fields, the month and the year of the previous month.

In the "Default Value Formula" of my parameter (type Integer), I have this formula : =SINGLEVALUEQUERY("PrevMonth"; "month").

The default value of the parameter is working well in the preview of the PRD 3.8.2-GA.

But once published in the biserver-ce (biserver-ce-3.10.0-stable), it doesn't work anymore. I get this message "This parameter value is of an invalid value" and the parameter default value is empty.

What could be the issue?

thank you,