Jump to content

REPORT_MAX_COUNT doesn't work in JS 3.7.1 and 4.1


Recommended Posts

Importing my reports from JS 3.5 to JS 3.7.1 or 4.1 I think to have found a bug on instantiation of the built-in parameter REPORT_MAX_COUNT.

Im my reports a user can choice REPORT_MAX_COUNT number from a "Single Select List of Values".

This works always in JS 3.5, but in JS 3.7.1 or 4.1 doesn't work if in the same form "Cascading Input Controls" are present.

If I remove them report runs, but links inside it that send REPORT_MAX_COUNT to other reports don't work.

See attacched images to understand the two errors.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • 7 months later...

 I have a workaround:

Code:
public class MyEngineServiceImpl extends EngineServiceImpl {	public OrderedMap executeQuery(ExecutionContext context,			ResourceReference queryReference, String keyColumn, String[] resultColumns,			ResourceReference defaultDataSourceReference,			Map parameterValues) {		Object reportMaxCount = parameterValues.get(JRParameter.REPORT_MAX_COUNT);		if (reportMaxCount instanceof String)			parameterValues.put(JRParameter.REPORT_MAX_COUNT, Integer.valueOf((String)reportMaxCount));		else if (reportMaxCount instanceof BigDecimal)			parameterValues.put(JRParameter.REPORT_MAX_COUNT, Integer.valueOf(((BigDecimal)reportMaxCount).intValue()));		return super.executeQuery(context,				queryReference, keyColumn, resultColumns,				defaultDataSourceReference,				parameterValues);	}}
Link to comment
Share on other sites

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...